- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2016 04:08 PM
Hi all,
I'm working on Helsinki Service Portal.
'resolving_change' is my checkbox field. Using g_form.getControl('resolving_change') to check if resolving_change field is visible on the form. But its not working.
Does anyone know a fix for this or an alternative I can use for g_form.getControl() in Service Portal?
-Gauri
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2016 07:25 PM
Found a work around. I changed my logic to check the checkbox field is checked depending upon the value selected from some specific field. (To give you a bit of a background, scenario here is that - my checkbox field depends on the value selected from some other field).
In this particular case, it was not appropriate to use g_form.getControl().
As per Samiul's suggestion, for those who need to use g_form.getControl(), use g_form.hasField() instead. Works better in Service Portal.
-Gauri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 11:27 PM
Hi ,
Can you explain more on this. Am also struggling with getcontrol function .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2020 11:27 PM
Hi ,
Can you explain more on this. Am also struggling with getcontrol function .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2018 11:12 AM
Hi,
There is a lot difference between g_form.getControl() and g_form.hasField().
g_form.hasField() will return true/false and nothing else possible, where g_form.getControl() returns HTML object So that you can read all the values to an array if it is select box. we can apply changes from script itself.