I’ve been working on a transform to determine the length of an identity attribute, which will help in making certain decisions. Below is the transform I used:
I applied the replaceAll transform to remove any null spaces and then nested it with a static transform to calculate the number of characters without spaces
however it is giving null error as :
There was an exception while calculating the value for this attribute. Error during transformation for attribute: adseed (Transform ID: ADseedsrinidhi) Cause: Error running identity attribute transform:java.lang.IllegalArgumentException: Value of ‘name’ cannot be null.
From what I see, this will return a string, not the length.
You must invert the structure. The static transform should be the outermost part of the transform. The static transform is used to execute a Velocity script
Here is an example of what may work, if I’m understanding your use case.
I’m curious as to your use case for needing the length. I have not tested this for you, it may need some additional refinement. My focus was on the order of the transform.
I’m curious as to the use case for needing the length. Are you looking at using it for a sAMAccountName, etc?
@ts_fpatterson - Thanks for swift reply, but unfortunately this is not working giving same error There was an exception while calculating the value for this attribute. Error during transformation for attribute: adseed (Transform ID: ADseedsrinidhi) Cause: Error rendering template: $inputName.length()
scenario that i want to achieve is, if lastname character is less than 3 , i need to append lastname+firstname for samaccountname