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 PTC Community Badges. Engage with PTC and see how many you can earn! X

alert information if data entry not finished

xiaoqw
15-Moonstone

alert information if data entry not finished

 

I drag drop down list widget, numeric entry widget, button widget, date time picker widget in my mashup. As all drop down box should be mandatory and if one of them is missing, when I click add button, it will not allow you to add data into database. how to put alert information into button widget?

3 REPLIES 3
posipova
20-Turquoise
(To:xiaoqw)

  I apologize I cannot understand your requirement here. What is the expected result and use case? What is the actual result?

Are you asking how to put an alert or some other information in the button widget? If so, that cannot be done with out-of-the-box widgets. You could use a value display (for example) or another widget that accepts input parameters to display.

xiaoqw
15-Moonstone
(To:posipova)

hi @posipova ,

sorry that I cannot describe my question clearly. what is my expectation is when I haven't selected all of drop down list widget, add button is disabled and also show the sentences, which should be mandatory part is not selected. Maybe I need to use validation widget. but I don't know how to use it

Hello @xiaoqw,

 

Your task is quite standard, and you have a couple of options:

 

  1. (the easiest) Just use "AutoSelectFirstRow" property on the dropdown. Then you will always have some selected value.
  2. (the one you really want) Use Validator function. For that you need to create a validator with one parameter per dropdown and bind those parameters to the corresponding Selected Row(s) on the services that fill those dropdowns with data. If the selection is empty, parameter value will be empty. In the validator write something like this:
    result = param1 && param2 && param3;
    so that it returns true only when all parameters are not empty. Then make sure you select Auto Evaluate for this validator, so that it is executed every time your parameter change. Finally, bind the validator result to Disabled property on the button. To display the warning you can also bind its True / False events to Status Message widget.

/ Constantine

Announcements


Top Tags