I'm trying to create a Form(for user creation) in Identity Portal 14.1. The requirement here is to have the user, who use this form to create another user in system, as the Manager for the user being created.
1. User A login to Identity Portal and use the User Creation form to create User B.
2. In the User Creation form, I would like to have a field labeled as Manager. This field should display(auto populate) the Logon ID/Logon Name of the User A.
3. The value of field "Manager" is then passed to Identity Manager to make use of the same in Approval Work Flow.
Please do share your suggestions to achieve the above scenario. Thanks much in advance!
You can probably using something like
prop.value = api.getRequester().userData[‘manager'];
in the prop initialization of the manager field.
Thanks much for your suggestion. I tried it but for some reason its not working for me. Could you please help me understand how your command works so that I can try best to fix the same for my environment.
Put something like the following in the initialization handler for the manager field
var requestor = api.getRequester();var reqfn = requestor.data.FirstName;var reqln = requestor.data.LastName;
console.log('Requestor data is ' + requestor);
console.log('Requestor first name is ' + reqfn);
console.log('Requestor last name is ' + reqln);
Then F12 on your browser to see the logs. This will show you what data is available
Presumably you want something like
var requid = requestor.data.UserId;
(check the exact syntax).
Then in order to write that value into the attribute, you use the command that Gil showed you
prop.value = requid;
That worked perfect!! Thanks much for your time and efforts!