Skip to main content

Notifications

Power Automate - General Discussion
Answered

Creating a Flow to Update all List Items

(0) ShareShare
ReportReport
Posted on by

I'm trying to create a flow that will update a column on ALL items in a list, based on responses in another column.  Please see the attached screenshots for reference: the flow should put a 'Yes' in the Security column if 'Security' is one of the selected choices in the Domains column.  I'm having trouble figuring this out.  I've built a flow (screenshots attached) but when tested, it puts a 'Yes' in the Security column of all items regardless of whether or not 'Security' is one of the selected choices in the Domains column.  FYI, the output I've placed in the 'Apply to Each' is 'value - List of Items'.  Many thanks in advance!

 

2023-08-25_10-32-19.png

Inked2023-08-25_10-37-59.jpg

2023-08-25_10-34-05.png

Categories:
  • wskinnermctc Profile Picture
    wskinnermctc 6,512 on at
    Re: Creating a Flow to Update all List Items

    Can you look at this post and see if it helps. (User didn't mark my answer as solution grrr..) But if you scroll down I have a lot of screenshots that show something very similar.

    https://powerusers.microsoft.com/t5/Building-Flows/Update-Y-N-Column-based-on-multiple-choice-field/m-p/2233608 

  • Verified answer
    SamLed Profile Picture
    SamLed 2,326 on at
    Re: Creating a Flow to Update all List Items

    Hi,

     

    I suggested replacing your "Add to String Variable" with a "Set Variable". So the variable will only contain the current item domains on each loop.

    In fact, each loop adds the domains of current item to the variable which kept those of the previous ones. During the second loop, it updates the "Test2" item, because the variable still contains "Test" domains where there is "Security", which makes the condition true.

    You can also use the "Domains" dynamic content directly in the condition, the variable seems unnecessary.

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • SamLed Profile Picture
    SamLed 2,326 on at
    Re: Creating a Flow to Update all List Items

    Hi,

     

    I proposed to replace your "Append to string variable" by a "Set variable". Variable will only contain current item domains on each loop.

    Actually each loop appends current item domains to variable which kept previous items ones. On second loop, it updates "Test2" item, because variable still contains "Test" domains where there is "Security" which makes the condition returning true.   

    You could also use "Domains" dynamic content directly  in the condition, variable looks useless.

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

  • Re: Creating a Flow to Update all List Items

    The Security, Governance, etc. columns are Yes/No.

  • Re: Creating a Flow to Update all List Items

    Thanks for your response! I'm following but still a little confused on the solution.  Any chance you could build it out for me so I can replicate it on my end and see if it works?  Apologies, I don't often work with variables.

  • wskinnermctc Profile Picture
    wskinnermctc 6,512 on at
    Re: Creating a Flow to Update all List Items

    @nathanisaacson Hi can you tell me what type of columns are the Security, Governance, etc? I'm assuming they are text type and they are not boolean type?

  • SamLed Profile Picture
    SamLed 2,326 on at
    Re: Creating a Flow to Update all List Items

    Hi,

     

    You are appending string to variable, so it append first item data which contains "Security". On next loop, you add second item data, but first one's data still present and your condition remains true.. Use "Set variable":

    SamLed_0-1692993762058.png

    ______________________________________________________________

    If I have answered your question, please Accept the post as solution.
    If you like my response, please Thumbs Up.

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard