cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
YasinJ93
Regular Visitor

Search Tab on Gallery with Filter Tabs

Hi

 

Wondering if anyone could help, I have set up a Gallery which is grouped by Tabs based on Choice Options on my SharePoint List. I want to include a search bar but my formula is not working, it works for 1 or the other but not both!

 

The formula I used is below:

 

SortByColumns(Filter([@'SharePointList'],Or(StartsWith('Address',GallerySearchBox.Text),Or(StartsWith('Number',GallerySearchBox.Text))),"ID",If(SortByColumns(Filter('SharePointList','Revisit Required'.Value=VarCurrentTab),"Modified",Descending)

 

Is anyone able to help or correct the formula so it is functioning please?

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

HI @YasinJ93 ,

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.

Visit my blog Practical Power Apps

View solution in original post

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @YasinJ93 ,

This is not Delegable, but should work

SortByColumns(
   Filter(
      [@'SharePointList'],
      Or(
         StartsWith(
         'Address',
         GallerySearchBox.Text
      ),
	  StartsWith(
         'Number',
         GallerySearchBox.Text
      )
   ),
   If(
      'Revisit Required'.Value = VarCurrentTab,
      "Modified",
      Descending,
      "ID",
      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.

Visit my blog Practical Power Apps

YasinJ93
Regular Visitor

Thank you for the reply (Y)

 

The revisit required flags as unrecognised in this formula and doesnt work =[

@YasinJ93 ,

That was your code which I simply copied assuming it to be valid.

'Revisit Required'.Value=VarCurrentTab

 Please check this reference in your model.

WarrenBelz
Super User
Super User

Hi @YasinJ93 ,

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.

Visit my blog Practical Power Apps

Hi Warren,

 

Thank you, the fx still doesn't give me the result I wish for. My goal is to set up a page with a Groupby function/Variety Box of option on a set drop down (which works fine). The page would be perfect if I could search records by ID as another layer of filtering after selecting the tab. The closest fx that has been working is:

 

SortByColumns(Filter([@'Inspection'], Or(StartsWith('Number',GallerySearchBox.Text)),"Title",If('Revisit Required'.Value=VarCurrentTab,"Modified",Descending,"ID",Ascending))

 

However, in this fx, the 'Revisit Required' isnt recognised (double blue underline)

 

When the Groupby is a stand alone fx like: 

 

SortByColumns(Filter('Inspection','Revisit Required'.Value=VarCurrentTab),"Modified",Descending)

 

It works perfectly fine, but can't search any records in the search box.

 

I am abit stuck on this and need help.

Hi @YasinJ93 ,

A double blue underline is a Delegation warning (entirely different problem) - not invalid values. You can do this to get rid of the warning, but the top filter is subject to your Delegation limit in output if you. The Delegation issue is the conditional sort

With(
   {
      wList:
      Filter(
         [@'SharePointList']
         StartsWith(
            'Address',
            GallerySearchBox.Text
         ) ||
         StartsWith(
            'Number',
            GallerySearchBox.Text
         )
      )
   },
   If(
      'Revisit Required'.Value = VarCurrentTab,
      SortByColumns(
         wList,
         "Modified",
         Descending
      ),
      SortByColumns(
         wList,
         "ID",
         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.

Visit my blog Practical Power Apps

WarrenBelz
Super User
Super User

HI @YasinJ93 ,

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.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

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.

Users online (2,289)