- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 06:06 PM
my client script works well in platform,
but it shows [TypeError: g_form.getOption is not a function] in portal.
kindly refer to the 15th line of the uploaded image.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 06:17 PM
@jieLian123 : Could you please try using below.
var choiceValue = g_form.getValue('your_field_Name');
var choiceLabel = g_form.getDisplayValue('your_field_Name');
Below is the article that helps to achieve your requirement (alternative of g_form.getOption() in service portal).
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 06:19 PM
Use this
var choiceLabel = g_form.getDisplayValue("<varname>");
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 06:17 PM
@jieLian123 : Could you please try using below.
var choiceValue = g_form.getValue('your_field_Name');
var choiceLabel = g_form.getDisplayValue('your_field_Name');
Below is the article that helps to achieve your requirement (alternative of g_form.getOption() in service portal).
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 06:30 PM
it works for me.
Thanks a lot for the help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2024 06:19 PM
Use this
var choiceLabel = g_form.getDisplayValue("<varname>");
Thanks,
Narsing