cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Multiple Filters

Hello everyone,

 

Again I'm stuck on a new problem. I need a gallery that is able to search from a TextSearchbox, only list the same item once and sort by descend and ascend. The code i use now is:

 

SortByColumns(Distinct(Search([@Contracten]; TextSearchBox1_3.Text; "Uitgever"); "Uitgever"); If(SortDescending1; Descending; Ascending))

 

Theres no indication what is wrong, so I hope somebody knows what to do. I'm not that experienced in PowerApps

 

Thank you in advance!

4 REPLIES 4
eka24
Super User
Super User

Try:

SortByColumns(Distinct(Search([@Contracten]; TextSearchBox1_3.Text; "Uitgever"); Uitgever);"Uitgever";If(SortDescending1; Descending; Ascending))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Anonymous
Not applicable

When I use your code It sadly still doesn't work. I have little experience with PowerApps, maybe my entire code might be wrong. If you have a reference to another topic or maybe another line of code.

@Anonymous ,

Try this - note that this structure has a fundamental flaw as you are searching on the same field as you have applied a Distinct filter on, so you need to change the first reference to get the field you need displayed that is Distinct to Uitgever. (otherwise you will get only one record)

SortByColumns(
   Distinct(
      Search(
         [@Contracten];
         TextSearchBox1_3.Text;
         "Uitgever"          //change this to the field you want displayed
      );
      Uitgever               
   );
   "Result";
   If(
      SortDescending1; 
      Descending; 
      Ascending
   )
)

 

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.

 

Hi @Anonymous ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

 

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.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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