Client Script - getValue of field not on form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 01:28 PM
Trying to use the value of a field in a Client Script, but the field is not on the form (nor do I want it to be).
I'm used to using something like:
var active = g_form.getValue('active');
It works if the field is on the form (RITM in this case) but it does not recognize if the field is not on the form.
Any ideas?
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 01:34 PM
Hi Jon, If you are on a version prior to Fuji, the field has to be on the form...BUT you can hide the field with a UI Policy. Thanks, Laurie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 01:42 PM
On Fuji. I'm seeing your suggestion and scratchpad as the two solutions. Thanks for the reply!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2016 07:00 AM
Hi Jon,
It looks like this has been mostly answered, but I strongly recommend the g_scratchpad/display business rule solution over adding the field to the form and hiding it. The first will not really affect your form load time and is very scalable, and the second affects it by adding more data to load and loading a policy to hide the field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2016 01:34 PM
Just a suggestion- can you try putting the field on the form, then using an onLoad UI Policy to hide it. Then, in the UI policy (advanced view), you can select 'Run Scripts' and put your client script in there?
I haven't tested this, I'm just spit-balling...
Cheers,
Tim