Click HERE to see how Saviynt Intelligence is transforming the industry. |
10/21/2024 03:47 AM
Hi,
I have a requirement to trigger user update rule when the following conditions occur:
To implement this, I have written the following query under User Update rule > Condition > Advanced Query:
a.statuskey = 0 AND (##a.statuskey isupdated##) AND (a.customproperty18 is null or a.customproperty18='') AND a.id in (select distinct manager from users where employeetype = 'Contingent Worker' and (leavestatus is null or leavestatus=''))
However, the rule is not getting triggered when I test for a user who satisfies the above condition.
Please advise.
Thanks,
Kunal
Solved! Go to Solution.
10/21/2024 04:19 AM
@kunal_saxena what is the trigger condition you have set for the rule?
Is it to trigger when updated via UI or import?
10/21/2024 04:53 AM
@NM - When user updated via import
10/21/2024 05:00 AM
@kunal_saxena so user is getting updated via import right?
Change the order and give it a shot
##a.statuskey isupdated## AND a.statuskey=0 AND (a.customproperty18 is null or a.customproperty18='') AND a.id in (select distinct manager from users where employeetype = 'Contingent Worker' and (leavestatus is null or leavestatus=''))
One more point if above doesn't work
instead of emoloyeetype use employeeType
10/21/2024 05:55 AM
@kunal_saxena try with in condition
a.statuskey = 0 AND (##a.statuskey isupdated##) AND (a.customproperty18 is null or a.customproperty18='') AND a.id in (select distinct manager from users where employeeType in ('Contingent Worker') and (leavestatus is null or leavestatus=''))
10/21/2024 06:31 AM
Use below query
a.statuskey = 0 AND (##a.statuskey isupdated##) AND (a.customproperty18 is null or a.customproperty18='') AND a.id in (select distinct manager from Users where employeeType = 'Contingent Worker' and (leaveStatus is null or leaveStatus=''))
10/21/2024 08:03 AM
Thanks @NM @Raghu @rushikeshvartak for your replies.
The advanced query suggested by @rushikeshvartak worked. User update rule is now triggered for the user.