PARTNERS - Please join us for our upcoming webinar:
Leveraging Intelligent Recommendations for Operational Transformation.
AMS Partners click HERE | EMEA/APJ Partners click HERE

Create User Form - Concat two form fields with a random number

Srikanth
New Contributor
New Contributor

Assume there are two dynamic attributes on the create user form, Value1 and Value2

In a third field, value1 and value2 need to be concated along with a random number.

This has to happend at runtime on the form itself, not after the form is submitted. I enter value1 and value2, the third fields should be concat of val1 + val2 + random number

Ex -

value1 = testing

value2 = saviynt

value3 = testingsaviynt<random number>

Note - The new value which is a concat, should be checked against a column in users table too.

Any leads on this ?

TIA.

7 REPLIES 7

rushikeshvartak
All-Star
All-Star

Random Number 

select FLOOR( RAND() * (maximumValue-minimumValue) + minimumValue) as anyVariableName;

select case when concat('$DA1','$DA2',FLOOR( RAND() * (10-1) + 1)) in (select username from users) then concat('$DA1','$DA2',FLOOR( RAND() * (10-1) + 1)) end as s

Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hello! I was trying to hide the displayname field in the Create User form but it should get the firstname and lastname of the user once it is created, I used this but it didn't work. Any suggestions? TIA

Insert into "Validation Conditon" parameter the following value : ${displayName==(firstname+' '+lastname)} by updating it accordingly with your attributes' name.


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Did not work. Should I still set the attribute displayname as STRING when I use that code?

Refer 

https://forums.saviynt.com/t5/general-discussions/is-there-a-way-to-generate-display-name-as-part-of... 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Unfortunately, this one didn't work. Seems that there's more something to it. 

You need single select drop down in order to auto populate display name please refer below configuration.

firstname & last name is string type & manager is  dropdown once manager is selected displayname will be populated

 

 

rushikeshvartak_0-1665363723735.png

rushikeshvartak_1-1665363796569.png

rushikeshvartak_3-1665363820661.png

 

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.