cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Phineas
Post Prodigy
Post Prodigy

Gallery not Populating as Desired Based on Filter

What am I missing?

I have Radio Control with three options.

The option chosen populates the Dropdown box list with content specific to that item choice.

One and two above are working fine.

The contents of the Dropdown auto-populate the Gallery. 

The original formula I had (shown below) DID successfully return the desired data, but only by TechnicianName. No data returned for the other two Radio Control options items (for obvious reasons).

Filter('Schedule Details List', IsBlank(ComboBox2_1.Selected.Value) || TechnicianName in ComboBox2_1.SelectedItems.Value)

I then tried the following - which is not working; no errors, just blank.

Filter('Schedule Details List', IsBlank(ComboBox2_1.Selected.Value),
If(JobSummaryFilterByRadioControl.Selected.Value="Customer Name", CustomerName in ComboBox2_1.SelectedItems.Value, If(JobSummaryFilterByRadioControl.Selected.Value="Truck VIN Number", TruckVinNumber in ComboBox2_1.SelectedItems.Value, If(JobSummaryFilterByRadioControl.Selected.Value="Technician Name", TechnicianName in ComboBox2_1.SelectedItems.Value))))

How can I edit either formula so that the Gallery autopopulates based on the item chosen in dropdown?

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

@Phineas ,

The below is valid code if your values are valid (which I assume are as you have no errors). If this does not work, check your data

With(
   {wSel: ComboBox2_1.SelectedItems.Value},
   Filter(
      'Schedule Details List', 
      Len(ComboBox2_1.Selected.Value) = 0 ||
      Switch(
         JobSummaryFilterByRadioControl.Selected.Value
         "Customer Name", 
         CustomerName in wSel, 
         "Truck VIN Number", 
         TruckVinNumber in wSel, 
         "Technician Name", 
         TechnicianName in wSel
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

1 REPLY 1
WarrenBelz
Super User
Super User

@Phineas ,

The below is valid code if your values are valid (which I assume are as you have no errors). If this does not work, check your data

With(
   {wSel: ComboBox2_1.SelectedItems.Value},
   Filter(
      'Schedule Details List', 
      Len(ComboBox2_1.Selected.Value) = 0 ||
      Switch(
         JobSummaryFilterByRadioControl.Selected.Value
         "Customer Name", 
         CustomerName in wSel, 
         "Truck VIN Number", 
         TruckVinNumber in wSel, 
         "Technician Name", 
         TechnicianName in wSel
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (1,931)