Execute logic in Task Form (Action Center)

I am trying to execute a script in Task Form , to calculate the value of text field (b) depending on the values of other fields (a1+a2) .

I add a logic to field (b) like this : dynamic forms

when I preview the form everything works fine , and (b) shows the sum of a1+a2
but when I send the form as a task to the action center , the script is not executed , why ??

This is the source code :
Test_DynamicFields.xaml (6.8 KB)
where :
“dependencies”: {
“UiPath.FormActivityLibrary”: “[1.1.6]”,
“UiPath.Persistence.Activities”: “[1.1.4]”,
“UiPath.System.Activities”: “[20.4.0]”
},

I figure out that the issue is not in the script , but it is because of the content of data in preview holds the values of all components , but in action center holds the properties of the same component , why that occurs ?

@FarahEtmeh Javascript is unfortunately disabled in ActionCenter for security reasons.
We are working on this, but JS would not be supported in forms in public preview.

2 Likes

So you mean that no matter what you do you will get the warning: Evaluator.js:78 No evaluations allowed for this renderer. if you try to run javascript logic in the action center?

Yes. We are working on to get JS enabled in ActionCenter. Will post back here once that is available.
PS: JS will only work in ActionCenter, not in Actions in Orchestrator.

so it will never work in actions, that are a part of the automation cloud e.g the portal shown in the image?

Yes, JavaScript as of now won’t work.

Hi @FarahEtmeh!

Did you find a solution to this issue? I am trying to apply Logic for values of fields in Form Tasks / Actions.

If we still cannot use JS, is there an alternative?

Thanks!

No I didn’t find any solution , I opened a ticket and contacted UIPATH support but they said that JS isn’t enabled in the action center due to security issues .
As a walkaround , Instead of making a real time validation , I allow the user to submit the form then check the data if it isn’t valid. I recreate the Form task with an error message .

Thank you!

1 Like

Basic JavaScript expressions are supported in Action Forms (advanced logic) with the latest update on Automation Cloud . We will be sharing an example workflow with a forum post today

1 Like

Please check example workflow for JavaScript expressions here New Action Center on Automation Cloud is GA now

Still, the JavaScript Advanced Logic is not working as expected in Action Center, while the script is working fine in Preview mode. (Same issue with the example workflow in ‘JS Expressions_in_Actions.zip’

Do we miss some parameter or configuration, in orchestrator?

Thanks,

1 Like

I am facing the same issue …

Hey, could you apply the latest UiPath.FormActivityLibrary (or min 1.1.7) and UiPath.persistence.activities 1.1.8 + and still unable to run the mentioned workflow ?
Please note to use ‘Actions’ service on Automation cloud ( and not within Orchestrator) as these new features are supported in the new service on Automation cloud.
cc @VikneshrajSP

1 Like

Thanks a lot for the information.

I confirm the script is working on the new service, ‘Actions’ on automation cloud.
Is there a way to have the same behavior from the orchestrator? (Before users get transition to the new service)

Best Regards,
Cheolmin

Hi @CheolminHwang , unfortunately no.,we plan to support all net new features in the new Actions service and we urge our customers to start moving business users to the new interface to get a direct , focused view of actions ( and off-course the new features)

Do we have an alternative to validate or sum two fields ?

The orchestrator is currelntlu onprem

Hello, I am trying to create dynamic sum value based on data in a column in AC Form. Is JS still currently disabled? If so, do you have any suggestions on how to achieve this? I plan to add a total block at the end and I want it to update based on whether the ProcessItem checkbox is checked.