Ui Policy 'onLoad' checkbox not working as expected
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â11-04-2024 12:44 AM
Hi Team,
I have written a UI policy with condition and have the 'OnLoad' checkbox unchecked. I have written a script onCondition for it to run when the condition matches. Ideally the expectation is that the script only runs when the value is changed as the onLoad checkbox is unchecked. But I noticed that when the condition matches the ui policy script runs Onload as well. The onCondition script executes when I refresh the form as well.
Does this mean the OnLoad false works only for Ui Policy actions and not ui policy script? Please let me know if you have noticed something similar.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â11-04-2024 04:58 AM
Docs doesn't seem to clarify this. It just says that Execute if True/False simply fire when the conditions are/are not met. I suspect that those scripts those scripts aren't checking the onLoad checkbox.
I spent a few minutes seeing if g_form had access to a function to tell if it was onload or not, but came up empty. That doesn't mean it doesn't exist, just that I couldn't find it in the 5 minutes I spent.
If it were me I'd continue that search for some client callable "am I loading" function.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
â11-04-2024 05:36 AM
Is there a reason you are not using an onChange Client Script for this?