How to fill the form automatically with identity attribute values

Hi Everyone
Just wanted to know how can we fill a form by selecting the identity and all its attribute can be prefilled automatically
Other than using IdentityModel

Hi @uditsahntl01 ,

We can use the identityModel to fetch all the attributes in one go. Attaching the source for your reference.

Form Models - Compass

Yes but I dont want to use this . Is there any different method ?

I will usually use a form model and then have an identity field that lets the user pick an identity and then additional fields for whatever attributes I want to show, usually read only.

 <Field columnSpan="1" displayName="Current Username" dynamic="true" name="currentUsername" type="string">
                  <Attributes>
                     <Map>
                        <entry key="readOnly" value="true"/>
                     </Map>
                  </Attributes>
                  <Script>
                     <Source><![CDATA[
                import sailpoint.object.Identity;
                String name= form.getField("identity").getValue();
                if ((name!= null) && (name!= void))
				{
                    Identity identity = context.getObjectByName(Identity.class,idname
                    if (identity != null) {
                                return identity.getAttribute("username");
                         }
                }
				return "";

]]></Source>
                  </Script>
               </Field>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.