cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass input and validate in validator of ThingWorx 8.4

BhavyaPC
Amethyst

How to pass input and validate in validator of ThingWorx 8.4

Hi,

can you tell me how to use validator in thingworx 8.4?

I have created validator and added a parameter. Service Output as input the parameter and service invoke complete will evaluates the validator.
I fell I have provided wrong expression which is giving true as output all the time.

 

BhavyaPC_0-1585853990674.png

With the above screenshot please tell me where I'm wrong.

3 REPLIES 3

Re: How to pass input and validate in validator of ThingWorx 8.4

Hi @BhavyaPC.

 

While testing under 8.5.4, we noticed the following:

 

  • By default, the validator is "true" before being evaluated.  This behavior can be fixed by running the validator on Mashup load.
  • You can also set the Auto Evaluate option to force it to evaluate as the value changes.

Can you try these in your environment and advise the status?

 

Note, there is an improvement coming in the 9.0 release targeted for June.

 

Regards.

 

--Sharon

Re: How to pass input and validate in validator of ThingWorx 8.4

@slangley ,

 

No luck, I tried Mashupload and AutoEvaluate every time it gives true output.

My objective is to Rename the file uploaded by user Through fileupload widget.

 

Fileupload complete triggers/Navigates Popup, on selecting row of a grid and clicking on apply button popup closes and a service will be called to rename the file uploaded. - Issue with this approach is If user didn't select any any row in the popup uploaded file name will not change.

 

Second approach I tried is,

 

  • upon user choose a file through a fileupload full path is passed to a textbox.
  • Change event of text box will call a service to check the default path and full path of chosen file.
  • Service invoke Completed of this service will trigger validator's evaluate Event on true Navigater will be triggered.
  • Navigation will give a model popup from which user will select a row (Filename) on closing popup, there is another service to check for the filename selection.
  • Then will guide user to click on upload then rename file.

Since validator is giving true all the time popup will be open all the time.

Also on upload complete wil

Could you suggest me if any other approach can be followed.

Re: How to pass input and validate in validator of ThingWorx 8.4

Hi @BhavyaPC.

 

Since you seem to be encountering issues that we aren't seeing under 8.5.4, it might be best to open a case for this issue. I wasn't able to find your email address set up in our systems, but if you have a support account under a different email address, let me know and I'll be happy to open the case on your behalf.

 

Something else to check, is the full version of the product your are running.  You can get this information by checking Help > About in the upper-right corner of the Composer window.  You mentioned 8.4, but we have released several patch updates.

 

Regards.

 

--Sharon

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.