07/28/2023 06:35 AM
Hi ,
Please refer below mentioned details.
Connection Details: Mainframe_LDAPGateway_TopSecret
Usecase:
We would need to populate the below concatenated attributes to mainframe account attribute “INSTDATA”. The requirement is to send values with the exact character position.
GEAC,username,Jobclass,First lsatname,DEPT ACID,SUBGROUP, CADOPID
Position of the Character:
1-4 GEAC
5 ,
6-12 Username
13 ,
14-21 Jobclass
22 ,
23-32 FIRST LAST
33 ,
34-38 DEPT ACID
39 ,
40-44 SUBGROUP
45 ,
46-51 CADOPID
For example:
The JobClass attribute value character is “8 characters”. If we receive job class as “LEAD” which is 4 characters and it should need to send to target application account as “LEADXXXX” here ‘X’ is space, here LEAD is 4 characters and space is 4 characters. And the value should sit exactly the mentioned positions between 14th to 21.
We have tried to concatenate with couple of scenarios but it was sent without adding space incase of attribute value is not fulfilling the required characters.
Regards,
Rajesh
07/29/2023 07:26 AM
Share current json
07/31/2023 05:44 AM
Hi Rushikesh,
I was trying with some test JSON and refer below.
"INSTDATA": "${'user.customproperty19'+''.substring(0,5)-(user.customproperty19.length())}"
Regards,
Rajesh
08/16/2023 04:52 AM
Hi
Any update on this?
08/28/2023 03:28 PM - edited 08/29/2023 08:16 AM
Can you try with the below and see if it works for you.
\"${String cp = user.customproperty19; cp = cp.padRight(8,' '); return cp}\"
And in case we also need the substring, we can use format as below
\"${String cp = user.customproperty19; cp = cp.substring(14,21).padRight(8,' '); return cp}\"
08/29/2023 08:19 PM
Hi Sahil,
Thanks for your reply.
The use case is not only sending value to target attribute also would need place in the exact character place.
The JobClass attribute value character is “8 characters”. If we receive job class as “LEAD” which is 4 characters and it should need to send to target application account as “LEADXXXX” here ‘X’ is space, here LEAD is 4 characters and space is 4 characters. And the value should sit exactly the mentioned positions between 14th to 21 with 8 characters including space.
Regards,
Rajesh
08/30/2023 09:04 AM
I am not sure what you mean when you say the value should sit exactly at the position between 14 to 21. Can you elaborate on this.
09/01/2023 08:06 AM
Hi Sahil,
We have requirement to send the groups of attribute values to target application field (INSTADATA) with exact character position.
For example:
GEAC,username,Jobclass,First lsatname,DEPT ACID,SUBGROUP, CADOPID
Position of the Character:
1-4 GEAC - This value should be placed between character position 1 to 4.
5 , 5th character position should be "comma"(,)
6-12 Username --- Username value should be placed exactly between 6-12 characters. For example username value length is only 4 characters so remaining position should be empty.
13 ,
14-21 Jobclass
22 ,
23-32 FIRST LAST
33 ,
34-38 DEPT ACID
39 ,
40-44 SUBGROUP
45 ,
46-51 CADOPID
Regards,
Rajesh
09/01/2023 09:18 AM
Can you share the postman export of this call and the current JSON you are using in Saviynt.
09/05/2023 10:30 AM
Hi @SB
We are not doing any postman exercise etc. The use case and JOSN which is tried is mentioned in the same trail.
Can we have quick call on this to explore the possible solutions for this use case.
Regards,
Rajesh
09/05/2023 12:11 PM
If this a REST Based connection, we should test it first from postman. And then for it to work from Saviynt, we will need the postman payload to help with the JSON construction.
This is a community forum and a call will not be possible. You can reach out to your CSM for PS help or if a call is needed for discussion around the use case.
09/20/2023 08:53 PM
It seems that you want to be able to calculate the value of one of the attributes where the position of certain text remains intact. You may want to try to form the Groovy expression for that attribute into the following manner
'GEAC'.concat(',').concat(user?.username?.length()<7 ? user?.username.concat(String.format("%"+(7-user?.username?.length())+"s", "").replace(' ', 'X')) : username?.substring(0,7)).concat(',').concat(user?.jobCode?.length()<7 ? user?.jobCode?.concat(String.format("%"+(7-user?.jobCode?.length())+"s", "").replace(' ', 'X')) : user?.jobCode?.substring(0,7))
09/25/2023 06:43 AM
Hi Amit,
Thanks for your response. We have tested only for username by taking from the given syntax.
The given syntax is not working and errored out.
Error while creating account in AD - No such property: username for class: SimpleTemplateScript999Checking DN for uid=ts001221,ou=People,dc=tops,dc=com.Not FOund DN for uid=ts001221,ou=People,dc=tops,dc=com.
I removed the syntax and tried the task completed successfully.
The user case is to place the attribute values in exact position with defined number of characters.
The JobClass attribute value character is “8 characters”. If we receive job class as “LEAD” which is 4 characters and it should need to send to target application account as “LEADXXXX” here ‘X’ is space, here LEAD is 4 characters and space is 4 characters so "LEAD ". And the value should sit exactly the mentioned positions between 14th to 21 with 8 characters including space.
09/26/2023 04:34 AM
Can you share the portion of the JSON where you are using this?