Autopopulating variables in record producer

yundlu316
Kilo Guru

Our team is creating a record producer that has a variable called "Subject Person" that is a reference to HR Profile.  We also have another variable called "Work Schedule" that we're hoping to autopopulate with Full Time vs. Part Time based on the HR Profile that is chosen.  Is there a way to autopopulate this variable from HR Profile based on the Subject Person that is selected?

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hi,

Yes. You'd want to create an onChange client script that triggers on the subject person field. When that triggers, it'll look up the user's record and bring back that data to place in that field. PLease see link for more details: https://community.servicenow.com/community?id=community_question&sys_id=5b73cf25dbd8dbc01dcaf3231f96...

Please mark reply as Helpful/Correct. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

premer
Giga Expert

Do you want to auto-populate this field on the record producer, as soon as the subject person is selected (so on the Service Portal I suppose), or after the record producer has been submitted?

preferably as soon as the subject person is selected

Then you will indeed have to use a GlideAjax script include as Allen suggested.