I am looking for tutorial or some material to reference on how I can use available variables in Javascript of Create Form activity.
Appreciate if someone can guide me to right direction.
My current use case is to pre-populate 2nd Date / Time component with + 3 days based on date selected in first Date / Time component. i.e., if I select 2021/03/30 in datetime1, then datetime2 should populate 2021/04/02. Something like that.
To do so I am trying to understand how can I best use the available variables in Advance logic. i.e., “row”, “data”, “component” and “result”.
Hi @harshilmehta - thanks for the inquiry, we’ll have to test this to see if we can find a solution that can work for you. We will follow-up – thanks.
After lots of trial and error I finally found a solution. However, I would still like to keep this post open to see if someone can share any tutorial or documentation around the correct usage of these variables. It seems UiPath does not have any official documentation, so having one would be greatly useful.
Below is my solution as of now:
Trigger is set with dynamic logic so javascript doesn’t continuously run:
Above logic is written in Advance Logic of 2nd date component (date_ToDate). The “return” assigns date to my 2nd date component. i.e., row.date_ToDate
It took me some time to understand difference between “row” and “data” variable. “row” variable only works on components within editgrid component. Where as “data” works for rest all components.
@harshilmehta Thanks for your suggestions. We are working on the new improved documentation.
There is another way to achieve this easily by “CalcuatedValue” in Edit json property.
Please look at the below example I created for you…