I did something similar for a Dynamics Data Action call. mine looks like this:
api/data/v9.0/phonecalls?${esc.dollar}select=activityid,actualstart,createdon&${esc.dollar}orderby=$esc.url("createdon asc")&${esc.dollar}top=1&${esc.d}filter=$esc.url("(isgc_interactionid eq '${input.id}')")
Where my goal is to get the activity ID in Dynamics, filtering by a specific Interaction ID, which is an input value. Maybe try this?
$esc.url("(isgc_interactionid eq '${input.id}')")Thanks,
Peter
------------------------------
Peter Stoltenberg
Avtex Solutions, LLC
------------------------------
Original Message:
Sent: 06-22-2022 13:31
From: Velmani Natarajan
Subject: JSON Query filter syntax
We are attempting to call our Dynamics endpoint with a Filter that uses a Variable set in the Contracts portion of the Data Action. The Variable, MEMBER_ID, will be the value in the mvp_memberid field of our endpoint table. Here is one of the test API calls we've tried to accomplish this:
/api/data/v8.1/hsl_policymembers?${esc.dollar}select=_hsl_client_value,hsl_name,createdon,mvp_effectivedate,mvp_terminationdate&${esc.d}filter=$esc.url(mvp_memberid eq $input.MEMBER_ID)
The Data Action produced an error when testing – I've attached the error message for reference. Essentially, it is complaining about the syntax the call is using around the filter portion of the call.
We have tried lots of variations of syntax to try and get the call to work with no success. If you could help us to identify correct syntax for the call we would greatly appreciate it.
Is there any documentation or training available on how to write the format the OData calls used in Data actions. They don't follow the standard syntax
#Integrations
------------------------------
Velmani Natarajan
MVP Health Plan, Inc.
------------------------------