Symantec Identity Management

Expand all | Collapse all

Auto-Populate a field value in Identity Portal Form

Jump to Best Answer
  • 1.  Auto-Populate a field value in Identity Portal Form

    Posted 01-04-2019 05:15 AM

    Hello Everyone,

     

    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.

     

    Requirement:

    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!

     

     

    Regards,

    Navin



  • 2.  Re: Auto-Populate a field value in Identity Portal Form

    Posted 01-07-2019 06:51 AM

    You can probably using something like

                    prop.value = api.getRequester().userData[‘manager'][0];

    in the prop initialization of the manager field.



  • 3.  Re: Auto-Populate a field value in Identity Portal Form

    Posted 01-07-2019 08:08 AM

    Hi Gil,

     

    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.

     

    Thanks again!

     

    Regards,

    Navin



  • 4.  Re: Auto-Populate a field value in Identity Portal Form
    Best Answer

     
    Posted 01-08-2019 04:31 AM

    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;

     

    Pearse

     



  • 5.  Re: Auto-Populate a field value in Identity Portal Form

    Posted 01-09-2019 07:51 AM

    Hello Pearse,

     

    That worked perfect!! Thanks much for your time and efforts!

     

     

    Regards,

    Navin