cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GurBAL
Advocate I
Advocate I

Search For Text in Dynamics 365 Task Description

I am trying to write a flow that will return D365 tasks whose Description field contains a specific text string.  In the Flow, the text string is contained in a variable called Hash (if it matters, Hash is about 95-125 characters long and has no spaces).  I am using the "List Records" action, and have tried a few different formulas in the "Filter Query" section but can't seem to make it work.  I have tried:

  • substringof(description,'@{variables('Hash')}') - Results in an error during test: BadRequest "An unknown function with name 'substringof' was found"
  • substringof('@{variables('Hash')}',description) - Results in an error during test: BadRequest "An unknown function with name 'substringof' was found"
  • contains(description,'@{variables('Hash')}') - Flow runs successfully, but no task is returned even though there is a task whose description contains Hash.

Can anyone suggest a filter query that will return D365 Tasks that have the Hash string somewhere in the Description field?  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
GurBAL
Advocate I
Advocate I

Problem solved!  When I recreated the filter query using one of the same formulas as above (the "contains" version), but using the Dynamic Content box to build the query instead of doing it manually, the flow finished successfully and the Task was found.  Not sure why that made the difference, but thought I would update here in case someone runs into this in the future.  Cheers!

View solution in original post

2 REPLIES 2
GurBAL
Advocate I
Advocate I

One more detail.  I am evaluating whether any matching tasks are found with the following Condition: 

 

length(body('List_records')?['value']) is greater than 0

GurBAL
Advocate I
Advocate I

Problem solved!  When I recreated the filter query using one of the same formulas as above (the "contains" version), but using the Dynamic Content box to build the query instead of doing it manually, the flow finished successfully and the Task was found.  Not sure why that made the difference, but thought I would update here in case someone runs into this in the future.  Cheers!

View solution in original post

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (48,392)