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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

How to validated fieds(dropdown/textbox) on button click to check if empty or null?

Sheetal_sable
12-Amethyst

How to validated fieds(dropdown/textbox) on button click to check if empty or null?

Hi,

 

 I have widgets like dropdown, textbox and date range. I want to provide a validation on it. when i select the fields or value my data is populated in grid. But when i dont select one of the fields (dropdown, date range or textbox), an error message must popup(e. Must select or Enter a value)( Or must select the date range correctly) on button click, how can i do it?

 

Please provide me the way for doing it.

 

Thanks,

Sheetal

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Sheetal_sable,

 

You might want to check out the answers to this similar question.

 

/ Constantine

View solution in original post

2 REPLIES 2

Hi Sheetal,

 

You may achieve what you are looking for using validator and a status message. You may find the validator either from the bottom right Fuction tab. Click the "+" button on the functions tab and choose to add Validator from the available options. Create a validator as shown in the attached image. Depending on the version of ThingWorx you are on, you may find the Status message from the widgets sections or the bottom right functions section. Create a status message with your desired message and bind the ShowMessage event to the false event of the validator. This will invoke the status message whenever your validator results false.

 

Please let me know if you run into any issues with the implementation.

 

Best regards,

Rajesh.

 
 

 

Hello @Sheetal_sable,

 

You might want to check out the answers to this similar question.

 

/ Constantine

Top Tags