garima | 2020-12-03 10:24:25 UTC | #1
HI , I am using a data action which uses below get request (request url template) successfully.
working request url template looks like : https://abc.com/api/table/users?sysparm_fields=email,name&phone=65xxxxx67x
Now , I have to add an 'or condition' as well in my request url template . I have 2 phone numbers - phone1 and phone2 and want to see if the phone number entered is present in either of the two fields and basis that i am fetching email and name if the user.
Desired request url : https://abc.com/api/table/users?sysparm_fields=email,name&phone1=65xxxxx67xORphone2=65xxxxx67x
How can i achieve this ?
Jason_Mathison | 2020-12-03 12:29:08 UTC | #2
Hi garima,
Using "sysparm_fields" makes me guess that you are trying to data dip from servicenow.
The table lookup documentation I found indicates that you would need to this as a query since you want to "OR" several possible lookups. See the documentation on sysparm_query here:
https://developer.servicenow.com/dev.do#!/reference/api/orlando/rest/c_TableAPI
--Jason
garima | 2020-12-04 09:29:29 UTC | #3
thanks Jason , it worked :slight_smile:
system | 2021-01-04 09:29:34 UTC | #4
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 9429