When selecting “My Self” radio button, the next field will automatically fill requester ID.
And when “Other User” radio button is selected the field becomes a dropdown which contains all Sailpoint ID’s. in which accounts and can be selected.
Hi @dylanfoggan
I tried your part of script. Did some required changes. Form received an error and did not not open. Then I tried your code as it is. But still does not seem to work in the form.
@pctripathi
Can you be more clear , you are allowing to select more than one requester, so what is your expectation for the new field as the managers can be different for each user, if you provide what exactly is needed here, can provide a solution accordingly, please help with this details.
Hi @iamksatish
I’ll explain how this code is working
There is a field which will unhide and show requester detail when “My Self” radio button is selected otherwise it will be hidden.
In next section I have made another field that is allowing me to choose requester only if “Other User” radio button is selected, otherwise it will remain hidden.
Now I need to auto populate manager details by getting the userID of the requester in another field just below requester field.
The approach I was thinking is that - (Field 20 = the field which is autopopulating itself on selecting “My Self” radio button)
There will be a field below field 20 which will check if field 20 is null. If not null it will read the user ID and display its supervisor’s name in it, otherwise hidden.
Same goes with “Other requester” field which will also have another field below it and will check for any ID on above field in order to find supervisor, otherwise stays hidden.
Hi @Arun-Kumar
Thanks, your code is working for other user field. But showing blank field when “My Self” radio button, which gives output in Field 20, is selected.
i have verified, it is populating the managerName when you select the “My Self” radio button. Are you testing this form using spadmin? If the managerName is empty for the Identity, it will not populate the managerName. You can add the else condition like managerName is null, you can return the spadmin as a Manager. I have included that logic. Please check with this and let me know.
Hi @Arun-Kumar
Thanks for your solution.
And if I need the supervisor details instead of manager’s details should I go ahead and replace .getManager with .getSupervisor?
I checked and found that in some accounts manager name is missing but supervisor name is given in every account. So I am thinking to user Supervisor instead of manager.
Tried .getSupervisor and .getSupervisorName but neither of them worked.
getSupervisor() method is not available in Identity Object. You should use identity.getAttribute(“supervisor”) method to get the supervisor details. Please check what is the Identity attribute name for supervisor in identity Mapping.
HI @Arun-Kumar
Can you share any template like where I can use Supervisor Name instead of Manager.
I checked in identities name of the supervisors is written under “Supervisor Name” type. And most of them manager name is null under “Manager” type.
Go to Global settings–>Identity Mappings. Search the supervisor attribute and open. you can see the actual Attirbute name for the Supervisor. You should use the same attribute name in identity.getAttribute(“Attribute name”); Replace the Attribute name with supervisor attribute name. Attach the screen shot for reference.
Hi @Arun-Kumar
Thanks for the solution. It is working now.
Small concern though. Even after enebling refresh on change, when I am coming back to “My Self radio button”, the manager is not changing. Infact, MySelf manager name is visible before selecting mySelf button with opening of the form.