Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

Username Generation Rule - Auto Increment not respecting in-flight Requests

Murmur
Regular Contributor II
Regular Contributor II

Hi everyone, 

I wanted to know, how you handle Username generation. RIght now I have th eissue, that subsequent Requests use the same Username, as the "Auto Increment" Feature does not seem to respect In-Flight requests. 

Murmur_0-1710513161039.png

Any hints how to tackle this? 

Cheers 🙂

9 REPLIES 9

stalluri
Regular Contributor II
Regular Contributor II

select concat("SE",case when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1)) = 1) then concat('00000', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1),CHAR)) when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1)) = 2) then concat('0000', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1),CHAR)) when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1)) = 3) then concat('000', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1),CHAR)) when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1)) = 4) then concat('00', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1),CHAR)) when (length(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1)) = 5) then concat('0', CONVERT(greatest(max(substring(raa.attribute_value,3,length(raa.attribute_value)))+1 , MAX(substring(u.username, 3, length(u.username)))+1),CHAR)) END) AS ID from request_access_attrs raa,users u where raa.attribute_name = 'Username' and raa.attribute_value like 'SE0%' and u.username like 'SE0%' and length(u.username) = 8


Best Regards,
Sam Talluri
If you find this a helpful response, kindly consider selecting Accept As Solution and clicking on the kudos button.

rushikeshvartak
All-Star
All-Star

How requests is raised via ARS / Import sheet 


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Murmur
Regular Contributor II
Regular Contributor II

Hi @rushikeshvartak - The requests are raised via ARS

@Murmur try using the feature FN_EIC_SEQGEN which is theere in EIC.

You can use the same in your username generation rule.

More Details here : Database Functions (saviyntcloud.com)

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Murmur
Regular Contributor II
Regular Contributor II

Hi @Manu269 

Thanks for the hint. UNfortunately I'm not able to get it resolved in the "Add Register User Rule". 

I tried the following SQL Queries, with no success: 

  • concat('SE',${FN_EIC_SEQGEN('extInc')}) => SE${FN_EIC_SEQGENextInc}
  • concat('SE',FN_EIC_SEQGEN('extInc')) => SEFNEICSEQGENextInc

Any hin on how to use this properly here? 

Create dynamic attribute and user user column = Username


Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Sample :

case when (users.employeetype ='Vendor') then FN_EIC_SEQGEN ('Vendor') when (users.employeetype ='External') then FN_EIC_SEQGEN('External') end

Regards
Manish Kumar
If the response answered your query, please Accept As Solution and Kudos
.

Murmur
Regular Contributor II
Regular Contributor II

Thanks everyone, 

I now used a mix of your suggestions (I believe). 

  • New Attribute in Register User Form 
  • Murmur_0-1710864032923.png

     

  • SELECT CONCAT('SE','-', FN_EIC_SEQGEN('ExtCounterName')) as ID
  • Set up the Dataset under Admin > Identity Repository > Dataset > SEQUENCE_GEN_MAPPING
  • Murmur_1-1710864117166.png

     

  • Set a Value of 10000000 (This prevents the issue of having increasing length, when you start at 0 - Basically what was described above by @stalluri )