We are currently using Appian 20.3. We have a requirement to change the username to lower case when it is being added to a group. Is there any Appian function to convert the existing username in the profile to lower case?
Discussion posts and replies are publicly visible
I'd suggest the lower() function - It takes any text and converts all the characters to lowercase.
20.3 we got a a!renameuser to perform the operation . but can we have a rule which could get us all id's on the env with starting character as uppercase?
You'll have to use the function getdistinctusers() to return the list of all the users in a group. Then, you can use the exact() function to find items that don't match the casing that you're looking for. Something like this should work:
reject( fn!isnull, a!forEach( items: getdistinctusers( cons!GROUP_NAME ), expression: a!localVariables( local!firstCharacter: left(tostring(fv!item)), if( exact(lower(local!firstCharacter), local!firstCharacter), null, fv!item ) ) ) )