When I copy the javascript code into my project, or download the example xaml, when the project is run, the do block executes TWICE.
When there are multiple checkboxes with the copied javascript, this can cause the do block to execute in a seemingly infinite loop, locking up the whole program.
Not sure whether this is a bug in the activity or the documentation.
I have tried this on two different laptops and different versions of studio to confirm it wasn’t version specific.
2020.10.2 Enterprise
2022.4.4 Community Edition
Activities version is UiPath.Form.Activities = 2.0.2
Our team has investigated the issue reported and they’re working on fixing it. It looks like it isn’t a documentation issue, per se.
In the meantime, documentation for this tutorial has been updated with a potential workaround for this:
Inside the Data tab of the Checkbox component, in the Calculated Value section, remove the following part of the script: return updateOnChange.call(instance, flag, changed);
Noting that with the given workaround, the Do block continues to execute twice: when selecting the checkbox and when submitting the form, but it doesn’t execute in an infinite loop anymore.
Will inform you under this post when this known issue has been fixed. Thanks for reporting and let us know how the workaround behaves!