Hi, All
I have created a data table with columns [ UserName , PhoneNumber , Email , TimeSlot ].
I’m trying to retrieve data by taking phonenumber as user-input ! but before showing data I want to check if there are some element in response or not.
if there are some data in response they I’ll show it , else give a message that no data available with this phone number.
how to set this logic if(data present) show result
else show no data available.
thank You !
Hello @harsh.sharma6,
Using service response, we can use node connections to set the condition. First we use GetData service to pull data with the condition of phone number = entity input.
The response of a service node will look like below:
{"body":{"hasMore":false,"total":1,"metaInfo":[{"name":"Pnumber","type":"number"},{"name":"UserName","type":"string"},{"name":"sys_Id","type":"string"},{"name":"Created_On","type":"date"},{"name":"Updated_On","type":"date"},{"name":"Created_By","type":"string"},{"name":"Updated_By","type":"string"}],"queryResult":[{"Pnumber":9888889,"UserName":"XYZYSZ","sys_Id":"sys-64314c3b-0562-50f0-92eb-a77bc3bd4835","Created_On":"2021-9-20","Updated_On":"2021-9-20","Created_By":"st-fa4c0ba5-5a1a-5d8d-b728-39ccfc8dfda1","Updated_By":"st-fa4c0ba5-5a1a-5d8d-b728-39ccfc8dfda1"}]}}
Then, in connections, you can use the total count as a condition to trigger the desired flow as below:
Thanks @sameera.tumuluri , I have done it.