- 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
‎12-01-2016 05:29 PM
Instead of g_form.getControl(), use g_form.hasField() to determine if a field is present
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-01-2016 05:43 PM
Hi Samiul,
This checkbox field won't be visible always as it depends on some other field selection.
Problem with g_form.hasField() is - it'll always return true even if the checkbox field is hidden.
My requirement is to check if that checkbox is selected ONLY WHEN IT IS VISIBLE.
-Gauri
- 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
‎12-01-2016 07:46 PM
Hi Samiul,
Not saying what you posted is different or incorrect. For the people who will read the post later, for them I thought I should give my comments/tips and what my experience was.
-Gauri