- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2018 04:07 AM
Hi,
I'm creating a record producer where I have a "select box" and "reference" variables. How to capture the value entered by user from "Select Box" and "Reference" type variables. I tried g_form.getValue('variable_name') but it doesn't work.
What am I missing in syntax
Thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2018 06:47 AM
it should be like
current.field name=producer.variable_name;
current.audit_frequency=producer.audit_frequency;
current.biso_head=producer.sys_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2018 01:56 AM
current.u_biso_head is not populating. It's a reference field and the column name in table as well as the variable name is matching.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2024 12:24 PM
Thank you for this answer! I'm surprised how difficult it was for me to find out that I could simply use "producer" to access fields on it. Perhaps there is documentation somewhere I am missing? In any case, this answer saved me, truly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2018 01:40 AM
Hi,
your code should be like:
var audit = producer.audit_frequency;
var gr = new GlideRecord("give table name");
gr.addQuery("sys_id", current.sys_id);
gr.query();
if (gr.next()) {
gr.audit_frequency = audit;
gr.update();
}
Thanks,
Ravi