How can I create a UI Action and UI Page to Add records from another list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2020 04:12 PM
Hello,
Below are few screenshots of a capability I am trying to replicate. The idea is to click the "Add" button on the related list which then displays an iFrame or GlideWindow that allows the user to select records to add to the related list (via some other background scripts). I have already tried to dig into the code but the UI Page is hidden due to proprietary reasons.
I was able to somewhat replicate it by inserting an iFrame into another iFrame but the set back I have run into is the iFrame throwing an error / crashing when I insert to many sys_ids into my filter condition (filtering out records that have already been selected for the parent record). I posted about this issue in another post here.
If anyone has any recommendations I am all ears! Thanks!
Related List
iFrame / GlideWindow Popup (when user clicks "Add" above)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2020 05:27 PM
It'll depend on what / how you're scripting your filter condition. As the data value is just an encodedquery in a string format, you should be able to just pass it. Although, you might need to remove the first portion of the data:
sysparm_first_row=1&sysparm_query=
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2020 05:35 PM
I am doing something like this...
j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<g:evaluate var="jvar_ignoreProjects">
var sysparm_ignoreProjects = RP.getParameterValue("sysparm_ignoreProjects");
sysparm_ignoreProjects;
</g:evaluate>
<button style="float:right; margin-bottom:5px;" type="button" onclick="addPOAMs()">Add POAM to Selected Projects</button>
<iframe id="packages" src="x_snc_authorizatio_rmf_package_list.do?sysparm_fixed_query=project_idNOT IN${jvar_ignoreProjects}" height="100%" width="100%"></iframe>
</j:jelly>
I get the list of records to ignore in a UI Action and pass it to the UI Page. Any suggestions on how to do a check for the tiny_url parameter? can I do this in the client script of the UI Page?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2020 06:15 PM
My knowledge of Jelly & UI pages isn't that advanced unfortunately (something I'm working on). The easiest option as you suggested would be to run that query condition within the UI action before calling the GlideModal.