web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Task closure to update...
Power Automate
Unanswered

Task closure to update list entry that matches task description

(0) ShareShare
ReportReport
Posted on by 22

Hello, I'm struggling with a flow. I'm trying to link my task planner to a tracking list. In each task, the description matches a column called "Unique ID" in a list. Each item in the list can have multiple tasks. I'd like to track how many tasks for each item in the list have been closed and this only applies to tasks within a particular bucket. My below flow is a beast, so there are multiple screenshots. It's failing in the section of the flow where I am trying to set a "Action complete count" variable equal to the numeric value of already closed tasks in the list, increment the value, then update the list with the new value. It appears to be attempting to update the "Action complete count" variable for each item in the list regardless if the Unique IDs match, and then is skipping the update list step. Screen shots are below for each of the flow steps.

 

Flow step 1: Trigger on task closure, set variable for bucket id to verify correct bucket, and initialize variable to action count. - this all appears to be working.

eoblemp_0-1675976507128.png

 

Flow step 2 if bucket ID matches: Get task details and get list details and compare the two- this appears to be working.

eoblemp_1-1675976582096.png

 

Flow step 3 if Unique IDs match: Set "Action complete count" variable to value in list column and increment. - this is where it gets odd... The compose immediately after the condition returns the correct value, but the set variable and update of the list are in a loop. It's updating every entry in the list, not just the entry where the Unique IDs match.

eoblemp_4-1675977699893.png

 

Anyone have any idea where this is breaking down? Thanks in advance!

Categories:
I have the same question (0)
  • tom_riha Profile Picture
    10,185 Most Valuable Professional on at

    Hello @eoblemp ,

    try to use the Filter Query in the 'Get items' to get only the item that fits the condition, that way it should return only 1 item - the loop will run only once and process only the specific item. The filter query looks like:

    <column internal name> eq '<value>'

    It replaces the 'Condition' action which probably causes the problems in your flow as it must evaluate all the items in the list if you don't filter them.

  • eoblemp Profile Picture
    22 on at

    Thank you! So in my case the Filter Query would look like below?

    eoblemp_0-1676038679847.png

     

  • eoblemp Profile Picture
    22 on at

    When I use that it fails and returns the error "Bad Request". I also updated it to have _x0020_ instead of [space] in between Unique & ID with same error. Also tried "substringOf" instead of "eg" to the same effect.

    eoblemp_0-1676046379759.png

    eoblemp_1-1676046991435.png

     

     

  • eoblemp Profile Picture
    22 on at

    I see in one of your other blog posts that this doesn't work if the column that you are trying to filter is a calculated column, which my "Unique ID" column is. Is there a work around?

  • Verified answer
    eoblemp Profile Picture
    22 on at

    Removing the filter query and switching to a filter array worked. Thank you so much for your help!

     

    eoblemp_2-1676048935280.png

     

     

    Reference links for anyone else in the same situation:

    https://tomriha.com/4-most-common-problems-with-data-filter-in-power-automate/

    https://sharepains.com/2021/04/14/filter-by-calculated-fields/

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard