cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mattd56
New Member

Filter combobox options

Hi everyone,

 

I have created a power apps to pull available overtime opportunities from a share point list. I am trying to filter the choices in a combobox. So the combobox is being populated by records from a column (OTname) in a share point list(OTlist). I want it to only display the otname records in the combobox where the value of another column (OTawarded) is “no”.  I have tried to use:

 

Filter([@OTlist].OTname, OTlist.OTawarded = “No”, Ascending));

for reference: otname is a single line of text, otawarded is a choice. I am receiving an incompatible types for comparison error. I have also tried “.value” after OTawarded however no value option came up in the auto fill so I just received another error.

I am rather new to power apps and I appreciate any help, please let me know if you need more details.

 

thanks,

matt

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Mattd56 ,

Is this what you are trying to do?

Sort(
   Filter(
      OTlist, 
      OTawarded = “No”
   ).OTname, 
   Otname
)

 

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.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @Mattd56 ,

Is this what you are trying to do?

Sort(
   Filter(
      OTlist, 
      OTawarded = “No”
   ).OTname, 
   Otname
)

 

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.

notj
Post Prodigy
Post Prodigy

Hi Matt, 

 

First step would be to remove the ".OTname" part from your filter. You want to filter the table OTlist, not a field in the table. 

 

Then, I would make a collection somewhere in the app before opening that combobox with your filter, and then set the items of the combobox to just be that collection.

 

An example would be putting this in your AppStart:

ClearCollect(CurrentOTOffers,Filter(OTlist,OTawarded="No"));
 
Then your combobox items value would just be CurrentOTOffers.

Thank you very much for your help, it got me where I needed to go. I didn’t realize it was actually the ascending/descending part that was causing the error.

 

-Matt

HI @Mattd56 ,

It was actually the fact you had left out Sort - Ascending is the default and is not required. You also need the filed required on the end of the filter.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,272)