Showing results for 
Search instead for 
Did you mean: 
New Member

Common Data Service Trigger: Filter based on lookup value


I am trying to trigger my Cloud Flow whenever a certain field on a linked entity is not null. Is there any way how to achieve that using the CDS (current) connector?

The equivalent OData query looks like this:$filter=(_originatingleadid_value ne null and originatingleadid/dw_hubspotid_str ne null) and (originatingleadid/leadid ne null)



I tried the following, but it wont work:



I receive the following error message:

  "error": {
    "message""Exception parsing _originatingleadid_value ne null and originatingleadid/dw_hubspotid_str ne null and originatingleadid/leadid ne null submitted for attribute filterexpression of callback registration. Target entity: account. Exception: Microsoft.OData.ODataException: Could not find a property named 'originatingleadid' on type 'CallbackRegistration.account'.\r\n   at Microsoft.OData.UriParser.InnerPathTokenBinder.BindInnerPathSegment(InnerPathToken segmentToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.EndPathBinder.BindEndPath(EndPathToken endPathToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.GetOperandFromToken(BinaryOperatorKind operatorKind, QueryToken queryToken)\r\n   at Microsoft.OData.UriParser.BinaryOperatorBinder.BindBinaryOperator(BinaryOperatorToken binaryOperatorToken)\r\n   at Microsoft.OData.UriParser.MetadataBinder.Bind(QueryToken token)\r\n   at Microsoft.OData.UriParser.FilterBinder.BindFilter(QueryToken filter)\r\n   at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseFilterImplementation(String filter, ODataUriParserConfiguration configuration, ODataPathInfo odataPathInfo)\r\n   at Microsoft.OData.UriParser.ODataQueryOptionParser.ParseFilter()\r\n   at System.Web.OData.Query.FilterQueryOption.get_FilterClause()\r\n   at System.Web.OData.Query.FilterQueryOption.ApplyTo(IQueryable query, ODataQuerySettings querySettings)\r\n   at System.Web.OData.Query.ODataQueryOptions.ApplyTo(IQueryable query, ODataQuerySettings querySettings)\r\n   at System.Web.OData.Query.ODataQueryOptions`1.ApplyTo(IQueryable query)\r\n   at Microsoft.Crm.ObjectModel.EdmModelEvaluator.EvaluateFilterExpression(String filterExpression, ODataQueryOptions queryOptions)\r\n   at Microsoft.Crm.ObjectModel.EdmModelEvaluator.EvaluateFilterExpression(String filterExpression)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.<>c.<.cctor>b__31_0(EdmModelEvaluator evaluator, String testValue)\r\n   at Microsoft.Crm.ObjectModel.CallbackRegistrationService.ValidateInputEntity(IBusinessEntity entity, ExecutionContext context, IFeatureDetailContainer featureDetailContainer)"

Can someone help me solving this problem? Or isnt it possible at all?
Dual Super User II
Dual Super User II

Hi @StefanBrending 

Let me understand you more you want to trigger the flow when the field originating lead on Account is Set?


If this is what you want to achieve please try the below:



After this you can use GetRecord to get the Lead Record and add further conditions / and filters

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (2,515)