- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 06:56 AM
How can I add code in g:evaluate using IF statement based on user select option from dropdown list? The IF statement will be if the user select role, it will call the sys_user_has_role table. If the user select group, it will call sys_user_group. I have tried use if(e.options[e.selectedIndex].value == "roles") but it doesn't work and it mess up the page.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 07:19 AM
The g:evaluate tags will allow you to run server-side code and access the usual server-side APIs (GlideRecord, GlideAggregate, etc).
So, it will not be able to plug into the client-side and get the currently selected value.
You will need to place your javascript code inside of the Client script portion of the UI Page or embed them within script tags.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2017 07:19 AM
The g:evaluate tags will allow you to run server-side code and access the usual server-side APIs (GlideRecord, GlideAggregate, etc).
So, it will not be able to plug into the client-side and get the currently selected value.
You will need to place your javascript code inside of the Client script portion of the UI Page or embed them within script tags.