- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2018 10:51 PM
Hi All,
There is a list with users Expense Lines. User is able to filter the list and by pressing the UI Action an export list (csv) should be generated via processor. Because some attributes necessary for the export are collected from a configuration table. Therefore I am trying to get the filtered lists encodedQueryString but I am failing. I tried it with g_list on client side but I am getting it is not defnied. GlideList2 is also not definied. The list has fixed query parameters and I also wanted to keep the order and stuff, like it is defnied in g_list.getQuery() API. Why is this global variable not definied on client? Also I do not want the user to have to select the relevant records, therefore the name of the UI Action starts with sysverb_.
Any ideas?
BR
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2018 04:29 AM
Ok, I found this solution:
UI Action is Server Side Script. URI contains query already as encodedQueryString. All you have to do is extract it from there. Following code shows how it works and it is by far easier as expected:
var uri = gs.action.getGlideURI(); // gives object from type GlideURI()
var quer = uri.get('sysparm_fixed_query'); // extracts fixed encoded query string
var quer2 = uri.get('sysparm_query'); // extracts users query string
gs.addInfoMessage(quer);
gs.addInfoMessage(quer2);
You are welcome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2018 04:29 AM
Ok, I found this solution:
UI Action is Server Side Script. URI contains query already as encodedQueryString. All you have to do is extract it from there. Following code shows how it works and it is by far easier as expected:
var uri = gs.action.getGlideURI(); // gives object from type GlideURI()
var quer = uri.get('sysparm_fixed_query'); // extracts fixed encoded query string
var quer2 = uri.get('sysparm_query'); // extracts users query string
gs.addInfoMessage(quer);
gs.addInfoMessage(quer2);
You are welcome!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2024 04:37 AM
There is a list contextual UI Action called "Delete all with preview"
That then opens this:
Regards,
N.