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 / Set Dropdown with Vari...
Power Apps
Unanswered

Set Dropdown with Variable

(0) ShareShare
ReportReport
Posted on by 237

Hi,

 

@WarrenBelz hope you can help me with this. I want to use an Approve All button in my gallery to help the approver easily approve multiple requests. If they use the Approve All button, all of the CFO Responses in the gallery should update to "Approve". However, they still should have the ability to change the "Approve" to "Reject" when needed. The fields within the gallery have an OnChange property set to select(btnUpdate). The btnUpdate OnSelect formula is:

 

If(
 IsBlank(
 LookUp(
 colAddMealsUpdates,
 ID = ThisItem.ID
 )
 ),
 Collect(
 colAddMealsUpdates,
 ThisItem
 )
);
UpdateIf(
 colAddMealsUpdates,
 ID = ThisItem.ID,
 {
 Title: txtTitle_3.Text,
 'Event Date': EventDate_3.SelectedDate,
 'Event Zip': txtEventZip_3.Text,
 'Required Meals': dpdRequiredMeals_3.Selected,
 'Event Duration (HH:MM)': txtDuration_3.Text,
 'Per Diem Rate': Value('txtPerDiemRate$'.Text),
 'Per Diem Total': Value(txtPerDiemTotal_3.Text),
 'Total Attendees': txtTtlAttendees.Text,
 'CFO Response': dpdCFOApproval.Selected,
 CFOComments: txtCFOComments.Text
 }
);
ClearCollect(
 colPerDiemRate,
 Table1
);
With(
 {
 // Perform the lookup once to get the relevant row in collection
 Meals: LookUp(
 colPerDiemRate,
 ThisItem.'Event Lookup:Event Zip Code'.Value = 'Zip Code'
 )
 },
 // Use Switch to determine which value to retrieve
 Switch(
 dpdRequiredMeals_3.Selected.Value,
 "Breakfast",
 Meals.'Breakfast ',
 "Light Refreshments",
 Meals.'Light Refreshments',
 "Lunch",
 Meals.Lunch,
 "Dinner",
 Meals.Dinner
 )
)

 

The Approve All Button: 

Set(varCFOResponse,"Approve")

 

Default Property of CFO Response Dropdown:

varCFOResponse

 

When I use the Approve All button, it updates the responses, however, they do not patch to the SharePoint list anymore. When the Approver would manually select the response for each dropdown, the response did patch to the SharePoint list.

 

Any help will be great!

 

NPatel12498_0-1713213611627.png

 

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 366 Most Valuable Professional

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 99 Super User 2026 Season 1

Last 30 days Overall leaderboard