
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2022 04:19 AM
Hello There,
I want to fetch the value of the ("number") field of the current record when I click a UI action button in a table.
Can anyone give me a demo code?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2022 04:21 AM
hello
you can just use current.number in UI action script
gs.addInfoMessage(current.number);
PLEASE MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2022 04:21 AM
hello
you can just use current.number in UI action script
gs.addInfoMessage(current.number);
PLEASE MARK MY ANSWER CORRECT IF IT HELPS YOU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2022 04:23 AM
Hi,
Try this in onclick function script-
onclick function - showNumber();
function showNumber(){
alert("numnber: " + current.number);
}
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2022 04:30 AM
Hi,
what's your script?
If you share that we can provide better suggestions
If your UI action is
1) Client side then
g_form.getValue('number')
2) Server side then
current.getValue('number')
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader