Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

How to check DynamicAttributes with if else in https Parameter REST Connector

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on September 21 2021 at 07:37 UTC

Dear Team,


I have the following in my CreateTicketJson:    

...."httpParams": "{\"CreatedBy\":\"reqAttrs.name\",\"Source\": \"Email\", \"RecID\": \"if(reqAttrs.heat_requestor.isEmpty() || reqAttrs.heat_requestor=='' || reqAttrs.heat_requestor==null){$requestor}else{reqAttrs.heat_requestor}\",....

   I want to check if attribute a is empty and if true then select $requestor else I want to insert the attribute a for RecID.

Is there a way on hwo to do that?


Thanks


Best Regards

Faizal

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.
4 REPLIES 4

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on September 21 2021 at 17:07 UTC

Faizal,


If you are using dynamic attributes, can you set a default value for it so that you can check against and then process your logic. Might be simpler that way.




Regards,

Avinash Chhetri


This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on September 22 2021 at 06:49 UTC

Hi Avinash,


thanks for the reply, I got it solved.


Best

Faizal

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on September 22 2021 at 14:20 UTC

Thanks Faizal, appreciate if you could post your solution on the forum so that others can also utilize it and mark this post as answered.




Regards,

Avinash Chhetri

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.

Community_User
Saviynt Employee
Saviynt Employee
Originally posted on September 22 2021 at 14:24 UTC

I just had a really basic syntax error. 

below is the right way on how to write it starting from the RecID:

  

RecID\":\"${if(reqAttrs.heat_requestor.isEmpty() || reqAttrs.heat_requestor=='' || reqAttrs.heat_requestor==null){$requestor}else{reqAttrs.heat_requestor}}\",

Best Regards,


Faizal 

This message was previously posted on Saviynt's legacy forum by a community user and has been moved over to this forum for continued exposure.