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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Replacing ForAll comma...
Power Automate
Suggested Answer

Replacing ForAll command in Power Apps

(0) ShareShare
ReportReport
Posted on by 14
I have a gallery in Power Apps where I would like to update all the items in the gallery using Power Automate instead of a ForAll command.
 
All the items are to have the same value in a specific column. Thats all... ;-)
 
I have tried with this flow...
And this command to call the flow...
UpdatePOlineitems.Run(Gallery2.AllItems;JSONFormat.Compact)
 
But I cannot get it to work... Help please... 
Categories:
I have the same question (0)
  • Suggested answer
    mrcwojcik Profile Picture
    68 on at
    After Compose action, make a Parse JSON action - if you're input data is passed correctly and it's array, then in your flow loop body from Parse JSON action will work okay
  • Suggested answer
    SpongYe Profile Picture
    5,715 Super User 2026 Season 1 on at
     
    Try this code:
    UpdatePOlineitems.Run(
        JSON(Gallery2.AllItems; JSONFormat.IgnoreUnsupportedTypes)
    )
    
    Hope this helps!
  • CU14081108-3 Profile Picture
    14 on at
    Now, the call from Power Apps is working correctly.
     
    But the Parse JSON is not... 
    Could you please describe exactly how I should use this function?
    (remember that the gallery sent from Power Apps contains eg. 7 rows - and it is only these 7 rows that needs to be updated - and it is only one of the columns that needs to be updated... The rest should remain unchanged)
     
    wkr Jørgen
  • mrcwojcik Profile Picture
    68 on at
    Could you show us, what output you have in Compose action?
  • CU14081108-3 Profile Picture
    14 on at
    I am new to this Power Automate, so I might have misunderstood some of the functions, so if any data needs to be changed - please guide me... ;-)
     
     
  • Suggested answer
    mrcwojcik Profile Picture
    68 on at
    Ok... so you should do this:

    First you have your input from app:


    Now you can use Parse JSON on this:
     
     
    Still your output should be same, but now you can work on text property.
    So then you can use once again Compose action and at input field you can use Expression:

    json(body('Parse_JSON')?['text'])

     
    That will change your text into JSON that you can use in your Apply to each.
     


    Of course if you want to update only SPECIFIC columns you need to filter your array before Loop or make condition inside.
  • Suggested answer
    MrGott Profile Picture
    101 on at
    I don't think you need ForAll or a Power Automate Flow to achieve that.
     
    Patch(IndkobsordreDataljer, Gallery2.AllItems,{IndkoebsordreDetaljeStatus:"TEST"})
     
    Should do the trick.
    If you want to update the Items only if a condition is met, then add Filter clause like that:
     
    Patch(IndkobsordreDataljer, Filter(Gallery2.AllItems, SpecificColumn = "SpecificValue"),{IndkoebsordreDetaljeStatus:"TEST"})
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 67

#2
David_MA Profile Picture

David_MA 64 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 39 Most Valuable Professional

Last 30 days Overall leaderboard