Get variable value outside script tag in Ui MACRO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2024 10:51 PM
Hi,
I have a UI macro, purpose is that I need to show the retrieved data in a tabular format. For this inside the script tag I have a function which is fetching the sys_id using g_form, Outside the script tag i'm using the g:evaluate to glide on a table with the sysid which i got through the function.. Inside the g_evaluate i'm getting the response and parsing it . The output is JSON array
As I need to glide how can I get that sys_id out from the script tag.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2024 02:21 AM
Hi,
Inside the UI macro you can access "current" inside a <g2:evaluate> tag.
When you store that in a variable you can use it in different places in your macro.
<g2:evaluate>
var recordID = current.getUniqueValue();
</g2:evaluate>
<div>I am currently looking at record with sys_id $[HTML:recordID]</div>