The CreatorCon Call for Content is officially open! Get started here.

Reference Type

radhamanchi
Tera Contributor

In catalog creation, I created one variable "requested for" type "Reference", if I login with Radha Manchi the name should be populate in that variable. How should I do this?

11 REPLIES 11

Yes correct, but if you use variable type as 'requested for' there is no need to use the javascript code you have given above, the variable will itself get the logged in user to that field without any code.

Mark this solution as accepted and helpful as it will be helpful for other users and readers as well.

Best Regards.

Saurabh V.

@radhamanchi , Hope you are doing well. I have given the possible solutions regarding the requirement of your catalog item.

1. Use variable "Requested Type"

2. In default value use this code " javascript:gs.getUserID();"

3. Use on change client script or onLoad would also work:

var user = g_form.getValue('caller_id');

g_form.setValue('requested_for', user);

Note- This way you can make requested for variable more dynamic depending on the requirement.

 

If this solution helped you Please Mark this solution as accepted and helpful as it will be helpful for other users as well.
Best Regards.
Saurabh V.