Dynamic form validation with action center

Hi all ,
Can I pass a dynamic value to the form to use it in form validation (as maximum and minimum values ) please note that I want to use it in task form in action center not with the local form .

Yes, you can use the Collection property to do this.
The variables will automatically appear as components and you can use the variable names to reference these components on the form.

Thanks @codenameCata
Is that working with an action center ? I am using collection property , but I can’t add scripts or using components variable when I work with an action center , could you please show me where you setup the validation ?

Let’s say that we have a date component that should be less than another date (that I passed it to collection property) … How can I use this variable in the validation tab or conditional tab ?

If you have control over the two dates (or any data in your case) before passing them to the form, you could do all the decision making using standard UiPath activities or Invoke Code instead of trying to run conditions in the form.
You could send a boolean flag, based on which you can control the visibility of the button(s).

If you want to change the visibility on values that change at runtime due to user’s input (for example “From date must not be AFTER To Date” in case of a booking form) then you may need to look at form scripting, using Javascript or Lodash.

I hope this helps.

I already do that but I want to make a dynamic validation while the user changes the input , unfortunately scripts doesn’t work with the action center due to security issues .
Thanks anyway .

1 Like

Basic JavaScript expressions are now supported in Actions forms. Please check out this post New Action Center on Automation Cloud is GA now