- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2015 09:48 AM
In my UI page I've got the following line:
<g:ui_reference name="service" table="cmdb_ci_service" query="u_state=Active"/>
I want that query field to be dynamic though. Specifically, I want to run a GlideRecord() against the u_user_membership, pull out just the services for which I have a specifc role, and then pass that list of services to be the valid list for the above reference.
What would be even cooler is that if there is just one service for the person, then to display a label with that value instead of a reference picker.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2015 10:13 AM
Scott,
You can do some thing like this :
<g:evaluate>
//do your glidequery here
//set a variable 'query' to the list of services
</g:evalaute>
<g:ui_reference name="service" table="cmdb_ci_service" query="{query}"/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2015 10:13 AM
Scott,
You can do some thing like this :
<g:evaluate>
//do your glidequery here
//set a variable 'query' to the list of services
</g:evalaute>
<g:ui_reference name="service" table="cmdb_ci_service" query="{query}"/>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2015 10:32 AM
Thank you, that's perfect!