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

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Trouble with create ta...
Power Automate
Unanswered

Trouble with create task but when it's modified, delete or override existing task

(1) ShareShare
ReportReport
Posted on by 13

Hi supporters, this flow is currently creating a new task anytime the date is modified however, instead of creating a new task based on my flow in my screenshot, how can I add a condition that when the old task be updated or delete the existing one if the date is modified and not created as new? I'm not sure if I'm making sense. Regardless, it will always create new task which means there is an existing one when its modified. 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: Trouble with create task but when it's modified, delete or override existing task

    Hi @Hilo222 

     

    Assuming your title is unique for the tasks. Follow the below steps:

     

    image.png

    Above I am checking the trigger title (SharePoint) vs List Tasks Title. Here I assume Title is unqiue otherwise you won't be able to do this.

     

    image.png

     

    Above expression for the condition is as follows:

     

    length(body('Filter_array'))
     
     
    There is another alternate way. See below steps.
     
    1. Create a SharePoint column called TaskId.
    2. After the trigger when a file is created or modified, check TaskId is null or not? If not null create task. This will return the task id. Then update the SharePoint column TaskId using the task id you created.
    3. If not null trigger will return the taskid use that taskid for the update task.
     
    Thanks
  • Hilo222 Profile Picture
    13 on at
    Re: Trouble with create task but when it's modified, delete or override existing task

    Thank you for responding @abm It doesn't seem to work for me. 

    Yes it is there is a unique id field called "Request ID" which will have a ##. The original screenshot I sent, was to look at specific field in condition "Special" is equal to "Yes" then create task but there is a compose based on a field called "Expected date" and the output will be expected date minus -1 business day (expression: 

    if(equals(dayOfWeek(outputs('Compose')),1),  -3 , if(equals(dayOfWeek(outputs('Compose')),0), -2  , -1 ) )" 
     
    But when I follow your suggestion, by adding few conditions and updating a task, it doesn't seem to be working and dates are out of place. Not sure where I'm going wrong here. 
  • abm abm Profile Picture
    32,856 Most Valuable Professional on at
    Re: Trouble with create task but when it's modified, delete or override existing task

    Hi @Hilo222 

     

    I don't think its quite right. You have a title field which contains other values too. I have given an example for the reference only. In your case construct the same title for the comparison. Also under the create you need to map the values from the trigger. Believe you are mapping from the wrong element hence you getting multiple apply to each.

     

    Or the other way is follow the second solution I mentioned which is much easier.

     

    Thanks

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
Tomac Profile Picture

Tomac 497 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 477 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 242

Last 30 days Overall leaderboard