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 Apps / Update all items in a ...
Power Apps
Answered

Update all items in a gallery

(0) ShareShare
ReportReport
Posted on by 44

Hi all,

 

I have a SP list called 'Task' containing items and a lookup column called ParentTask linked to the ID column in the same 'Task' list.

What I want to achieve is basically users to link certain items together to 1 masteritem. Sort of like a sub-task within a larger task.

 

I have a gallery "galLinkItems" filtering the items from my SP list so the gallery contains possible sub-tasks for the larger task and in the gallery I have a combobox / checkbox for each item in the gallery for when the user wants to link the item as a sub-task to the larger task.

 

The larger task is displayed in a form called frmTaskSchedule so my larger task ID is in there.

 

I assume i need to use ForAll and Patch but i can't get it to work.

 

Any help would be greatly appreciated.

 

Thanks!

Hans

Categories:
I have the same question (0)
  • Sunil-Narnaware Profile Picture
    681 on at

    @Lennova : how are you plan to link the sub-task with main task.? what I mean here is... are you using Combobox or Checkbox (If checkbox, how user will know which task it should be assigned to?) .. Combobox I can understand that it can be list of tasks which don't have task ID assigned hence these are parent tasks and then on selection of it.. we can patch it.. but can you share more insights on the approach you would like to take..? also the use of Form ?

  • Lennova Profile Picture
    44 on at

    Hi Sunil,

     

    I have a screen where a form displays details of the main task. On that same screen I have a gallery where possible sub-tasks are displayed. In that gallery i have a checkbox for each sub-task.

     

    User will turn checkbox to on when they want to link the main task to that sub-task. User will click a save button that will patch the main task ID in the parenttask column in my SP list when the checkbox for that specific sub-task has been checked.

  • Sunil-Narnaware Profile Picture
    681 on at

    @Lennova.. what is the Item property of your Form? how are you selecting you Main task?

  • Lennova Profile Picture
    44 on at

    Hi Sunil,

     

    The main task is selected in a gallery on a different screen. So, my form is populated with the ID of the task.

  • Verified answer
    Lennova Profile Picture
    44 on at

    Solved!

     

    Below did the trick. My ParentTask column in my SP list was a lookup column. I have re-created the column as a number and now it all works.

     

    ForAll(
    Filter( galSubTask.AllItems,
    cbSubTask.Value = true
    ),
    Patch( Task,
    LookUp( Task, ID = Value(lblSubID.Text) ),
    { ParentTask: Value(lblMainID.Text) }
    )
    )

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard