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

Requestee object in the workflow is not working

shubhangsinha_
New Contributor III
New Contributor III

Hello Everyone,

 

In the query below I am fetching the approvers based on users(requestees) cp19 and the dataset is built like 

CompanyApprovers
CompAtestA@domain.com
CompBtestB@domain.com
CompCtestC@domain.com

So I have written a query in customquery block of the workflow as follows which is working fine in the data analyzer if I replace ${REQUESTEE} with a hardcoded userkey value, but it is failing the workflow. Kindly help me if possible that how do I get the userkey for the requestee in the workflow-->

select distinct u1.userkey from dataset_values,users u1, users u2 where dataset_values.datasetname = 'Sample_Approvers' AND u1.email=dataset_values.attribute2 and u2.customproperty19 = dataset_values.attribute1 and u2.userkey = ${REQUESTEE}

3 REPLIES 3

armaanzahir
Valued Contributor
Valued Contributor

Hi @shubhangsinha_ ,

Can you try the below query:

select distinct u1.userkey from dataset_values,users u1, users u2 where dataset_values.datasetname = 'Sample_Approvers' AND u1.email=dataset_values.attribute2 and u2.customproperty19 = dataset_values.attribute1 and u2.username = '${user.username}'

Workflow Components (saviyntcloud.com)

Thanks,

Armaan

Regards,
Md Armaan Zahir

Saathvik
All-Star
All-Star

Try below logic

 

select distinct u1.userkey from dataset_values,users u1, users u2 where dataset_values.datasetname = 'Sample_Approvers' AND u1.email=dataset_values.attribute2 and u2.customproperty19 = dataset_values.attribute1 and u2.userkey = ${user.id}

or 

select distinct u1.userkey from dataset_values,users u1, users u2 where dataset_values.datasetname = 'Sample_Approvers' AND u1.email=dataset_values.attribute2 and u2.customproperty19 = dataset_values.attribute1 and u2.username = '${user.username}'

Regards,
Saathvik
If this reply answered your question, please Accept As Solution and give Kudos to help others facing similar issue.

Thank you so much, it worked