cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Unable to filter data with eq operator for Tasks list

Hi All,

 

I am trying to filter a list of CRM Tasks based on the related field of Tasks (i.e. whether the task is related to Opportunity, Accounts, Contact etc.). But I am unable to filter the record and getting an error which I don't know what I am doing wrong. If someone can help me with how to do this filter. Below snap for reference. 

 

1111.PNG

 

Error Message: "A binary operator with incompatible types was detected. Found operand types 'Edm.Guid' and 'Edm.String' for operator kind 'Equal'."

 

Can anyone help me please how to filter the record based on _regardingobjectid_type or is there any other way around that someone can suggest.

 

Thanks,

Waleed.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Unable to filter data with eq operator for Tasks list

 

Hi @WaleedBinAfzal ,

 

As an alternative workaround, we could use Filter array to filter records.

You only need to configure state as a filter in Filter Query, then you use Filter array to filter records and use _regardingobjectid_type as a filter.

Image reference:

17.PNG

 

Besides, if you use Filter array to filter records, you may have difficulty in reference to the value of the field.

You could use Parse JSON to parse the body of the Filter array so that you could get the value of field easily.

I hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Super User III
Super User III

Re: Unable to filter data with eq operator for Tasks list

Hello @WaleedBinAfzal

The value _regardingobjectid_type is a lookup. This is expecting a GUID.

To see what values you need to filter on. I suggest using the List records without a filter, than run the flow, to see what values each field stores.




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




Highlighted
Helper I
Helper I

Re: Unable to filter data with eq operator for Tasks list

Hi @Jcook ,

 

Thanks for this quicker. 

 

I have already tried running the flow without filters on List Tasks. In this particular field which I am trying to filter it is containing just entity name which is opportunities in the above case in the image I posted. And that's what exactly I want to filter based on the type of the record. But it's not working. 

When I am trying to run the flow without filters, the field _regardingobjectid_type is returning entity name which is opportunities in this particular case.

 

Highlighted
Community Support
Community Support

Re: Unable to filter data with eq operator for Tasks list

 

Hi @WaleedBinAfzal ,

 

I could reproduce the same issue on my side. When checking the body of the List records, we could find the value of _regardingobjectid_type is 'accounts', but we need to configure the _regardingobjectid_value in Filter Query to filter records. It is strange.

Image reference:

2.PNG1.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper I
Helper I

Re: Unable to filter data with eq operator for Tasks list

Hi @v-bacao-msft

 

Yeah, it is strange that we have to compare _regardingobjectid_type with _regardingobjectid_value but that's not fulfilling the purpose.  _regardingobjectid_value is used to filter individual records not all the records of an entity. What I am trying to achieve here is to filter all the task records that are related to opportunities. But it seems there is no workaround for that, how can we filter all the task records related to opportunities. I am still unable to fix this issue.

Highlighted
Community Support
Community Support

Re: Unable to filter data with eq operator for Tasks list

 

Hi @WaleedBinAfzal ,

 

As an alternative workaround, we could use Filter array to filter records.

You only need to configure state as a filter in Filter Query, then you use Filter array to filter records and use _regardingobjectid_type as a filter.

Image reference:

17.PNG

 

Besides, if you use Filter array to filter records, you may have difficulty in reference to the value of the field.

You could use Parse JSON to parse the body of the Filter array so that you could get the value of field easily.

I hope it helps.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
New Member

Re: Unable to filter data with eq operator for Tasks list

Hi @WaleedBinAfzal ,

 

interestingly I have the same problem with using regardingobjectid_type to query record types and found this thread today.

 

When I am using your advice my flow test fails with the error message "Invalid type. Expected Object but got Array." when using the JSON parse. But I need an object to work with the filtered records.

 

How can I get a solution for this? Do you have a valid schema for CRM record lists?
 
Thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,296)