How to pre-populate fields in catalog item?

Michael M1
Giga Expert

I am creating a variable set for each for with the fields Requested By, Requested For, and Requested For Manager.

When I create the first field (Requested By) it is a reference to sys_user. I then make an advanced reference qualifier as "javascript:gs.getUserID();" I have also tried 'gs.getUser()'.

When I click 'Try It' on my catalog item, this variable is always blank.

How can I test this? Is this incorrect ?

1 ACCEPTED SOLUTION

Nitin_NOW
Tera Guru

Yes that is the what exactly needed in the Default value field. What do you have in 'Variable attributes' field? Please put 'ref_ac_columns=email;user_name' in the variable attributes field along with the Default value 'javascript:gs.getUserID();' and try again.

Please hit correct based on impact of response.

Regards

View solution in original post

2 REPLIES 2

Nitin_NOW
Tera Guru

Yes that is the what exactly needed in the Default value field. What do you have in 'Variable attributes' field? Please put 'ref_ac_columns=email;user_name' in the variable attributes field along with the Default value 'javascript:gs.getUserID();' and try again.

Please hit correct based on impact of response.

Regards

Michael M1
Giga Expert

Yes, that worked.

So for Requested For field's email, is it...

javascript:g_form.requested_for.getRecord().getValue('email');  ??

 

How can I dot-walk from a reference field on the form (not current logged in user).