- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 07:55 AM
Hi All,
Requirement: In a catalog item, there's a list collector field called 'Asset'. If we select an asset in the field and there is already a request existing with that asset, then we need to show an error message saying, 'XYZ asset is already requested". This is working in the Portal. But this needs to be working in the Native view as well.
For the error message to display, I need to get the display value of the value that is chosen in the field.
But g_form.getDisplayValue() is not working for native view, it's giving the blank value.
I also tried using, g_form.getDisplayBox('field_name').value; It still did not work. It's not giving any alert message when I tried see what it results in.
How can I proceed with this?
Thanks in Advance.
Solved! Go to Solution.
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 08:11 AM
If g_form.getDisplayValue() and g_form.getDisplayBox('field_name').value are not working as expected in the Native view to retrieve the display value of the selected asset in the list collector field, you may need to try an alternative approach. One way to achieve this is by using client-side GlideAjax to fetch the display value of the selected asset. , you can asynchronously fetch the display value of the selected asset in the Native view of the catalog item, allowing you to display the appropriate error message if needed.
if you find it helpful please accept as solution
best
Chetna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2024 08:11 AM
If g_form.getDisplayValue() and g_form.getDisplayBox('field_name').value are not working as expected in the Native view to retrieve the display value of the selected asset in the list collector field, you may need to try an alternative approach. One way to achieve this is by using client-side GlideAjax to fetch the display value of the selected asset. , you can asynchronously fetch the display value of the selected asset in the Native view of the catalog item, allowing you to display the appropriate error message if needed.
if you find it helpful please accept as solution
best
Chetna