Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Set Dropdown with Variable

(0) ShareShare
ReportReport
Posted on by 227

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

 

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,702 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard