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 / Manage multiple events...
Power Apps
Unanswered

Manage multiple events in a single collection and patch the datasource with status - SharePoint

(0) ShareShare
ReportReport
Posted on by 603

I have a powerapps gallery with SharePoint as the datasource. I can create multiple events in calendar year. Below is the screenshot for the same. 

 

Iantaylor2050_0-1693133499537.png

Once the events has been created and if i click on Event 1 View button, it will redirect me to the events detail page. Screenshot included below. 

 

Iantaylor2050_1-1693133499540.png

 

If i click on Event 2 View button, it should redirect me to the above screen, however all the checkbox checked in the Event 1 screen should appear unchecked and i can select whatever items i need for Event 2. 

 

Similarly if i create Event 3, it should also have same behaviour. 

 

By default, all the items has status "Ready for Purchase".

 

I also have submit button for each event. Once i click on submit button, it should patch the datasource with Status column as "Ready for Sale". Also, if items with Status "Sold Out" in Event 1, should not appear again for future events. 

 

I have included the code below for Event details page. Should i be creating separate collection for each events to track the checked and unchecked items? I am not in favor of creating separate collections because if users create 7 events or more, it will have that much collections. Any advice on how to tackle this scenario would be much appreciated. 

 

Gallery Items property

Filter(
colListData1,
(Len(SearchText_3.Text) = 0 || (SearchText_3.Text in 'Item Name' || SearchText_3.Text in Qty || SearchText_3.Text in 'Unit Price')) && (ComboBox9.Selected.Value = "All" || (ComboBox9.Selected.Value = "Checked Items" && checkBoxVal && EventID = currentevent.ID) || (ComboBox9.Selected.Value = "Unchecked Items" && (!checkBoxVal)))
)

Gallery CheckBox OnCheck

UpdateIf(
colListData1,
ID = ThisItem.ID,
{checkBoxVal: true,EventID:currentevent.ID}
)

 

Gallery CheckBox OnCheck

UpdateIf(
colListData1,
ID = ThisItem.ID,
{checkBoxVal: false,EventID:Blank()}
)

 

Gallery Checkbox Default

ThisItem.checkBoxVal&&ThisItem.EventID=currentevent.ID

 

Gallery SelectAll Checkbox at the top OnCheck

With(
{
_temp: colListData1
},
ForAll(_temp,
Patch(colListData1,
ThisRecord,
{
checkBoxVal:true
}
)
)
)

 

Gallery SelectAll Checkbox at the top OnUnCheck

With(
{
_temp: colListData1
},
ForAll(_temp,
Patch(colListData1,
ThisRecord,
{
checkBoxVal:false
}
)
)
)

 

Gallery SelectAll Checkbox at the top default

false

 

Gallery Submit Button

ForAll(
Gallery1_3.AllItems,
Patch(
colListData1,
ThisRecord,
{
Start_Value: Value(TextInput8.Text),
Incremental_Value: Value(ComboBox6.Selected.Value),
checkBoxVal: Checkbox1.Value,
EventID: currentevent.ID,

Status:"Ready for Sale"
}
)
);

 

Collection at App OnStart

ClearCollect(
colListData1,
AddColumns(Filter(
Items,Item_Status="Ready for Purchase"),
"checkBoxVal",
false
)
)

 

Categories:
I have the same question (0)

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 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard