- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2018 11:18 AM
Hello,
I was wondering if it was possible to have a UI action on the incident form that when pressed would pull 4 fields from the form. (For example: I would like to pull : Number, Company, Short Description and Priority)
I looked around the community forums and found this:
var field = g_form.getValue('fieldname');
window.prompt("Copy to clipboard: Ctrl+C, Enter", field);
The only problem is that, it only copies 1 field. I need as way to copy 4 fields and make it easy to copy to clipboard if possible.
I'm looking into using GlideDialogWindows but i'm unfamiliar with UI Pages at the moment. Any help would be appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2018 11:25 AM
If you just want the values comma delineated you could do something like:
var fieldArr = ['number','company','short_description','priority'];
var fieldValues = [];
for (var i = 0; i < fieldArr.length; i++) {
fieldValues.push(g_form.getValue(fieldArr[i]));
}
window.prompt("Copy to clipboard: Ctrl+C, Enter", fieldValues.join());
You can add or change fields by changing the fieldArr array variable.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2018 11:25 AM
If you just want the values comma delineated you could do something like:
var fieldArr = ['number','company','short_description','priority'];
var fieldValues = [];
for (var i = 0; i < fieldArr.length; i++) {
fieldValues.push(g_form.getValue(fieldArr[i]));
}
window.prompt("Copy to clipboard: Ctrl+C, Enter", fieldValues.join());
You can add or change fields by changing the fieldArr array variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2023 06:15 AM
Hi Brad
I have similar type of requirement. On clicking of UI button, it should push 4 field value to worknotes field, then form should be save and those four field should blank after the values copied to worknotes. Please suggest how to implement this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2018 11:41 AM
Perfect! That worked. Thank you. Much simpler than trying using UI Pages 🙂