Hi,
Is it possible to use a token {/dataset/variable} in Java Script ?
I have a process where the main process runs and then stops at a certain stage if a Sub Process has been kicked off, currently this works great, but I had to disable the "Save Draft" button. I am being asked to enable this button again.
This value is a Yes / No from a drop down, Main process form has this variable (hidden) and then on the sub process form is the same variable. The variable is hidden on the Main process form and I use JS to hide (When empty or "No") or show the button to proceed to the next stage once this value is "Yes". The issue is, when the "Save Draft" button is clicked, then this value does not update and then the users can't complete the process.
I want to remove this field from the Main Process and use Java Script to fetch the value from the other form on the sub process once it has been completed, the main process form will re-run this Java Script on form load especially when it is saved as draft.
Things I have tried:
- Use FX Calculation to =(variable)
- Add JS trigger on form load to update or trigger the same field
- Field Rules to show this field, but it is using the same field to hide it which does not work.
- Use workflow to retrieve the value and then update the value which does not work on the Save Draft
- Looked at several posts on answers, this one is the closest I got to an answer {/_currentuser} variable not changing in the same form - Laserfiche Answers
Any advice on this would be appreciated.