Click HERE to see how Saviynt Intelligence is transforming the industry. |
12/04/2023 10:28 AM
Hello Team,
I have a requirement like pass multi select dynamic attribute values to target system through Rest connect Add Access Json. could you please help me, How can we achieve this.
Please share me if anyone have correct syntax.
Thanks
Hemanth
12/04/2023 05:46 PM
${requestAccessAttributes?.get('Dynamicattributename')}
12/04/2023 07:54 PM
Hi Rushi,
Need to pass one value one time from the multi select dynamic attribute values. means if we select 2 values in multi select dynamic attribute we should sent one by one using List. do you have any syntax format for that.
Thanks
Hemanth
12/04/2023 08:28 PM
Sample:
${Map tempMap = new HashMap(); ArrayList arr = <arrayList>; if(arr.size()>0){arr.eachWithIndex{ val, idx -> {<add your logic here> tempMap.put('<key>', <value>)}; tempBuilder = new groovy.json.JsonBuilder(tempMap); return tempBuilder.toString();}else{''}}
12/10/2023 03:19 AM
Hi Rajesh,
I have tried using array and hashmap like below But still its i am getting an error and add access task not completing.
${ArrayList worklist = new ArrayList();String[] workarray = account.customproperty14.split(',');for(int i = 0; i < workarray.size(); i++){LinkedHashMap<String, String> groupJsonMap = new LinkedHashMap<>();groupJsonMap.put('key1', 'XXXXX');groupJsonMap.put('key2', workarray[i].trim());worklist.add(groupJsonMap)}; return new groovy.json.JsonBuilder(worklist)}
could you please help on this.
Thanks
Hemanth
12/10/2023 09:12 PM
@hemanthvn - Please provide the sample JSON which you need to pass as the payload.