I have created the following drop-down from scratch in my create identity form:
<Field displayName="Type of Account" helpKey="Choose from the following in the dropdown: AA, ZZ or Regular Account" name="adminacct" postBack="true" required="true" type="string">
<AllowedValuesDefinition>
<Value>
<List>
<String>AA</String>
<String>ZZ</String>
<String>Regular Account</String>
</List>
</Value>
</AllowedValuesDefinition>
</Field>
Further down depending on which of those 3 strings above you choose, it will be attached to the display name field with the first and last name as shown below:
<Field displayName="Display Name" displayOnly="true" dynamic="true" helpKey="Combination of First and Last name" name="displayName" postBack="true" required="true" type="string">
<Attributes>
<Map>
<entry key="readOnly" value="true"/>
</Map>
</Attributes>
<Script>
<Source>if(firstname !=null && lastname!=null)
return adminacct + firstname +"." + lastname</Source>
</Script>
</Field>
How can I return the source in to not include the string “Regular account”. I only want it to return “aa” and “zz”.