Set Display Value Not Working

kazidon
Giga Contributor

Hello Community!

I am running an inbound email action to parse out an email. I am then using the set display value method on variables on my form that it creates. Some variables are filling in and working and some are not. I am hoping you can help me figure out why. Below is a copy of my inbound email action, and some form info. One weird thing that is happening is that it will set the job title to a value like a string, but you can't see it on the form and it's not referencing that table.

INBOUND EMAIL

--------------------------------------------------------------------------------------------------------------------------

Hello IT Service Desk,

This is a request for IT to setup for the new hire.

New Hire Name: Emily M Vranes

 

New Hire/Rehire: Yes - New Hire

Position: Customer Support Rep Level I

Department: Client Support - UT

Location: Draper Headquarters

Needs Laptop: No

Orientation Date: 2018-08-06


Start Date: Monday, August 06, 2018
Reporting Manager: Eva Ariceaga
Manager's email: ***.****@****leasing.com

Thank you,

HR Department

--------------------------------------------------------------------------------------------------------------------------

 

INBOUND EMAIL ACTION

var email_string = email.body_text.toString();
var names = email.body.new_hire_name.toString().split(' ');
var username = email.body.new_hire_name;
var manager = email.body.reporting_manager;
var location = email.body.location;
var job_title = email.body.position;
var department = email.body.department;
var needs_laptop = email.body.needs_laptop;
var start_date = email.body.orientation_date;
var email_sys_id = sys_email.sys_id;

current.initialize();
current.u_new_hire_manager = manager;
if (names.length == 2)
	{
		current.u_first_name = names[0];
		current.u_last_name = names[1];
	}
if (names.length == 3)
	{
		current.u_first_name = names[0];
		current.u_last_name = names[2];
	}
current.u_username = username;
current.u_location.setDisplayValue(email.body.location);
current.u_job_title.setDisplayValue(email.body.position);
current.u_department.setDisplayValue(email.body.department);
if (needs_laptop == 'Yes')
	{
		current.u_needs_laptop = true;
	}
if (needs_laptop == 'No')
	{
		current.u_needs_laptop = false;
	}
current.u_start_date = start_date;
current.description = email_string;
current.state = 1;
current.assignment_group = '3adacb8813ad6e00d9ff30ded144b011';
current.short_description = 'New Hire Onboarding - ' + username;
current.reference_email = email_sys_id;
current.insert();

THE CREATED RECORD FROM THE INBOUND ACTION

find_real_file.png

I filled in Location, Start Date, Job Title, and Department. Those are the fields that are not auto filling, every other field is auto filling from my inbound action. Any tips or help or questions would be great, thank you!