Hello ThingWorx Community,
I'm currently working on a use case where a customer can either select a value from a dropdown or manually type a custom value into a text field. The idea is to give users flexibility in providing input.
Here’s the intended logic:
If the user selects a value from the dropdown and leaves the text field empty → the selected value is passed to a service.
If the user enters a value in the text field and leaves the dropdown empty → the typed value is passed to the same service.
If both fields are filled, the service should not execute. Instead, a status message should inform the user to only fill one field.
If neither field is filled, the service also should not execute and prompt the user.
I'm currently thinking to use an expression function to validate the input combination and trigger a service on button click accordingly.
Before I finalize this logic, I’d love to hear your thoughts:
Would there be a more elegant way to handle this validation and control flow (perhaps with validators or service parameter bindings)?
Appreciate any suggestions or shared experiences!
Thanks in advance,
Solved! Go to Solution.
I have used validator and expression and it worked well and as expected.
I have used validator and expression and it worked well and as expected.