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 III
Super User III

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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (51,816)