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

Notifications

Announcements

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard