- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2016 12:15 PM
I am struggling to get a table name through to a ui page
The UI action has
dialog.setPreference("table_name", g_form.getTableName());
the ui page has
<g:ui_table>
<g:set var="jvar_tablename" value="$[RP.getWindowProperties().get('table_name')]"/>
and a bit later on
gr.addQuery('table',jvar_tablename);
but it is not seemingly being passed the value
I have plenty of other ui pages that are working so I am a little bemused
for example, this is from one that works
UI action
dialog.setPreference("sysid", sysid);
UI Page
<g:ui_form>
<!-- Holds the Incident ID for use in HTML and the processing script -->
<j2:set var="jvar_incident_id" value="$[RP.getWindowProperties().get('sysid')]"/>
Only difference that I see is that the non working one is using a ui_table and the one that works is using ui_form, but I cannot see this making that much of a difference.
Any ideas would be appreciated
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2016 02:10 PM
This worked for me in the end
<g:evaluate jelly="true">
var table_name = RP.getParameterValue('sysparm_table_name') + '';
var strQuery = "table="+table_name+"^active=true"
var templates = new GlideRecord('sys_template');
templates.addEncodedQuery(strQuery);
templates.orderBy('name');
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2016 01:29 AM
Ahh 😃 thought I might have missed something that it could be used for
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2016 04:00 AM
As Brian says that is a hangover from when you guys were helping me with the initial version.
Now the code does what I want I need to tidy up the UI Page as somethings are out of alignment
Cheers