
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 09:14 PM
I have a requirement for a couple of fields to be populated with the appropriate information once a customer adds the name of the 'owner' of a dashboard - that persons email and department needs to then be added to the appropriate fields.
I have checked a number of forum posts similar, tried most of them and still can't get it to work, so here I am asking directly.
So based on the Owner name being added (which shows as the first name and surname - eg: Joe Bloggs) - note: it is almost certainly not going to be the name of the user entering the details.
owner_section would map to the 'Department' field
owner_email would map to the 'email' field
I believe all are available through sys_user
Also as a side question - is it possible to allow free text in a reference field if someone needs to enter something that is not available to select?
If someone could let me know how to do this I'd certainly be grateful.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 10:41 PM
Can you make that variable as reference and refer to cmn_department table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2018 08:53 AM
Hi,
Issue is resolved or not..
If yes please mark is correct..
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 10:28 PM
Hi,
The above code worked for me. Can you try with the code below in onChange client script,
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var caller = g_form.getReference('Owner_name', doAlert); // doAlert is our callback function
}
function doAlert(caller) { //reference is passed into callback as first arguments
g_form.addInfoMessage("caller..."+caller.email);
g_form.setValue('owner_section',caller.department);
g_form.setValue('owner_email',caller.email);
}
Please find below image on onChange client script,
Please find the result of above code,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 10:36 PM
yes that almost completely worked for me, but for some reason the owner_section field comes up with the following:
e87b2abe64a3530056fe64447b35344d
rather than the actual name of the section / department
email address appears correctly as desired.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 10:38 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2018 11:57 PM
Any updates Moedeb??
If you find the solution please mark my answer as correct and close the thread...