0

Did anyone use DataCheck.SetValue(control_Name, Message) in datacheck?

Hi,

I was trying to set a value to a extended field.

I am not able to understand how to use DataCheck.SetValue(control_Name, Message)?

Please help me.

Thanks & Regards,

SM

5 comments

Date Votes
0
Avatar
Josh Cole

Hello SM,

Working with extended data through a data-check is a bit more difficult than using the SetValue method. In the next MET/TEAM update, we are including streamlined support to make extended data access much easier. Unfortunately, we'll need to use a more complicated method with the current release.

I've attached a text file which has data-check code that accesses an extended data field. It may look complicated, but I've tried to make it easy to modify. 

To Use

  • Simply create a new data-check by pasting in the code from the attached file.
  • Change the "exDef" variable to match the extended data field you wish to access.
  • This data-check "requires" that an ex-data field has some value in it when yous ave the form.
    • If that is your goal - nothing else will need to change.

I hope this sample helps. Let me know if you have any questions.

Thank you!

-Joshua Cole
Fluke Calibration
Software Design Engineer
Attachment not imported: exdatasample.js_.txt
0
Avatar
Mankani, Soumya

Thanks Joshua,

We have Previous Cal date in the work order extended data.

I was trying to write a datacheck that populates the field with previous Cal Date on Click of Save button.

How can I do this in the datacheck?

I can get the previous Cal date from SQL query, how to assign it to the extended data field?

Thanks for your time and help.

Regards,

SM

 

0
Avatar
Josh Cole

Hello SM,

Just to confirm, you want to take the previous calibration date for the scheduled service of the asset associated with a work order. When you save this work order, you would like the previous calibration date to be copied into an extended data field.

Is this correct?

If so, can you pleaese tell me which Extended Data field you would like to copy the data to? For example: cField1

With that information, I will write a data-check that should help you.

Thank you!

-Joshua Cole
Fluke Calibration
Software Design Engineer
0
Avatar
Mankani, Soumya

Yes Joshua, you are correct.

And I want to copy the previous cal date to CallsheetsEx.tField1.

Thanks you for your help.

Regards,

SM

0
Avatar
Josh Cole

Hello SM,

I apologize for the delay. After doing some research, it appears that version 1.0.8 of MET/TEAM (and earlier) does not support the ability to modify Extended Data from a Data-Check. This is a bug. I have opened a ticket for this problem in our system and will make sure someone looks at it soon.

I am sorry that we could not fully resolve your data-check issue here. Pleaese let me know if you have any more questions.

Sincerely,

-Joshua Cole
Fluke Calibration
Software Design Engineer

Please sign in to leave a comment.