and more in a single search tool across platforms. Read the announcement here. |
03/14/2024 11:48 PM
Hi Team,
We would like to check requestee's customproperties whether there exists the value desired. If yes, then route to approver1, else route to approver2. The query below is used in if-else block, but it returns error and unable to submit the request.
SELECT COUNT(*) from users u where (u.customproperty10 LIKE '%abc%' or u.customproperty10 LIKE '%efg%' or u.customproperty11 LIKE '%abc%' or u.customproperty11 LIKE '%efg%' or u.customproperty12 LIKE '%abc%' or u.customproperty12 LIKE '%efg%') AND u.id= ${user.id} > 0
Appreciate your help on this.
03/15/2024 02:54 AM - edited 03/15/2024 02:59 AM
Hi @janice
If you want to check requester's custom properties, you can use the requestedby binding variable. Also since requestor is only one user there is no need to use select count and checking >0,
You can try something like
requestedby.customproperty10 == 'abc' or requestedby.customproperty11 == 'efg'
I tested with below condition and it works. You can modify as per your requirement.
requestedby.customproperty10 != null
Regards,
Dhruv Sharma
03/17/2024 07:00 PM
Use custom assignment block with Custom query
03/18/2024 02:31 AM
Hi @Dhruv_S @rushikeshvartak ,
Thanks for your response. May I know whether there is word count limit in the if-else block?
After several testing, I able to use the query below to check the customproperties. However, it works only until customproperty12, and when I add another OR condition for customproperty13, it returns error and unable to submit the request.
user.customproperty10.contains('abc') or user.customproperty10.contains('def') or user.customproperty11.contains('abc') or user.customproperty11.contains('def') or user.customproperty12.contains('abc') or user.customproperty12.contains('def') or user.customproperty13.contains('abc') or user.customproperty13.contains('def')
03/18/2024 02:37 AM
share log and ss workflow
03/18/2024 03:10 AM - edited 04/03/2024 06:26 PM
Hi @CR ,
Please find the screenshot and log attached.
The same requestor is used, and the condition in screenshot ifelse1 is working but it is not working after adding a few lines (highlighted in yellow) in screenshot ifelse2.
03/18/2024 03:12 AM
03/18/2024 03:15 AM - edited 04/03/2024 06:26 PM
03/18/2024 06:49 AM
Create another if else block for remaining condition