Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9236

Re: SAP IDM Create user policies

$
0
0

I have many - it depends on what your rules are for generating the name.

 

A really  basic one is:

 

initial = firstname.charAt(0);

tempName = initial+surname;

MaxCounter = 999;

 

curNames = uselect("Select mskeyvalue from idmv_valink_basic where mskeyvalue LIKE 'tempName%'");

 

tempCurNames = "!!" + curNames + "";

if(!curNames.InStr("!!" + tempName + "!!"));

{

     //tempName doesn't exist at all!  We are good to go.

   return tempName;

}

 

curNamesArray = curNames.Split("!!");

 

for(i=1; i < MaxCounter; i++)

{

     if(!curNames.InStr("!!" + tempName + i + "!!"))

     {

        //tempNamei does not exist.

        return tempName+i;

     }

}

 

Handle errors here...

 

NOTE - this is very basic and not very efficient but it will work (debug my javascript first! )

 

Peter


Viewing all articles
Browse latest Browse all 9236

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>