cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

StartsWith()

I have a gallery that I am filtering based on StartsWith().  Until just now I always thought that if the the Field for the filter was blank,  the statswith returns all records.  It seems I am wrong as I am finding that if the Column contains blank rows the startswith is automatically filtering them out so you are only ever seeing rows with data no matter what is in the filter box.  I am positive this has not always been the case and if Blanks are there they are included until something is put into teh Filter Box.  Am I wrong or has there been a change?

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: StartsWith()

@leyburn19 ,

Set the Default of your filter box to "" (empty string) and you will see all records until you type something in.

 

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.

Highlighted
Super User
Super User

Re: StartsWith()

Thanks Warren,  but that is the first thing I checked. 

Highlighted
Super User
Super User

Re: StartsWith()

Addendum. When I add a second statswith where both boxes are empty I get even less records as it is now filtering out the blanks of the  second input as well.  I have never seen this before

 

I was aware this happens when using teh in function so Startswith() seems to be doing the same

Highlighted
Super User III
Super User III

Re: StartsWith()

@leyburn19 ,

Strange - I just ran this on a 8,000 item list - something else wrong here?

StartsWith.gif

Highlighted
Super User
Super User

Re: StartsWith()

I am doing this on an 8171 items list.  Interesting I have two Views.  Both have the a Gallery based on the same list.  View one filters on a bunch of Columns and I have no issue.  View 2  I get the problem.  No rational reason yet

Highlighted
Super User
Super User

Re: StartsWith()

More to this,  in View 1 I am using search on fields that all have data in every row, so issue the is not obvious.   View 2 some search columns do not have data.  The list is always reduced to the Column that has the least rows with data in teh search group.

 

Startwith() has either changed or I did not understand it correctly the first time 

Highlighted
Super User III
Super User III

Re: StartsWith()

@leyburn19 ,

Just did a test on the same list on a field that has a lot of blank values - gallery Items

Filter(
   List,
   StartsWith(
      Voltage,
      TextSearchBox.Text
   )
)

Default of TextSearchBox is ""

StartsWithBlanks.gif

Highlighted
Super User II
Super User II

Re: StartsWith()

@leyburn19  @WarrenBelz 

When your records are created are these searching columns being forced to Blank()? Just curious because I think it maybe a data type issue vs PowerApps StartsWith() mismatch 

 

eg

if new rcord created, column that doesn't need a value straight away is left out of the Patch() thereby creating a weird data type in SP that isn't blank or "". I think I've seen this before with Date data types but can't recall the full issue.

Highlighted
Super User
Super User

Re: StartsWith()

Good idea and I checked but not the issue.  It turns out is to do with the Collection I was using.  I replaced it with the actual dat source and it was OK.

 

The other view had to be a Collection as teh client wanted to use the 'in' and there are over 8000 records.

 

This view does not need that so I can use the Datasource directly.  It is still an interesting problem as I would have thought the Collection should work the same

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,278)