- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2018 07:20 AM
Hi,
I would like to set default values for few fields through script in record producer which is mapped to same field name into a parent table.
Can someone please help here?
Regards,
Alok
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2018 10:53 AM
You could do an onload script to set the value.
g_form.setValue('variable', 'value');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2018 10:52 AM
Thank you Brian 🙂
I have updated it through the default value option. In case i wanna do it by script, how it can be done?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2018 10:53 AM
You could do an onload script to set the value.
g_form.setValue('variable', 'value');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2018 11:04 AM
okay.. Thank you 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2022 02:10 AM
@Brian Lancaster - This is an old post again but worth reaching out in case it is seen.
I have a similar situation where I went to set the default value on a variable.
I have created a Company variable on a record producer with a reference field type.
How can I set a default value in the company field (variable) to show the requesters company? on the variable within employee centre.
Can you explain how I can do this either via using the default value or by using onLoad client scripts please.
It would be greatly appreciated

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-28-2022 07:30 AM
Do you have a field on the form for the user or type reference or are you just using the logged in user?