Adding Requestor Title and Department to Form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 07:33 AM
I need to display the requester's title and department on the case form. Is a client side script the best option or is there something simpler? Thanks in Advance !
Case Form Fields
User Table:
- Labels:
-
Case and Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 07:45 AM
It depends how you want it to display. If you want those fields to be filled in when the opened_by field changes then you'll need a client script (and a glide ajax call to a script include) but if you want them filled when the form is saved you can use a before insert business rule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 07:48 AM
Hi Mike,
you don't need to write client script for this. you can add fields using dot walk.
1. Configure--> Form Layout
2. Select "Opened For" and expand
3. Select Title and department add it at your desired location in form
Thanks,
Sai
Hit like, Helpful or Correct depending on the impact of the response

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 07:48 AM
Hi Mike,
onChange() Client script that runs on Name field (considering is a reference field) with below snippet would be a better & only option if you want to get it worked when Name field changes.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '')
return;
var location = g_form.getValue("location");
var caller = g_form.getReference("name_of_user_field"); //field namewhere user is selected
if (location == "") {
if( caller != null)
g_form.setValue("location", caller.location);
}
}
Else, you can get a Before/After Business rule created as well but the Location will be filled only when record is saved.
I would prefer Client script though as results would show up on the go itself.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 07:54 AM
Agree but in this case, he has to create title and department fields on case table just for display purposes. I wouldn't recommend creating a new field and writing scripts to populate information if we can dot walk and display Opened For information. Just my perception though. please correct if I'm wrong