cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Filter sharepoint list, don't show in gallery items with missing field

Hi 

 

I am stll working in my sign in app. I want the gallery to only show people who hasn't signed out yet. Which means I want it  to pull out only the names of people who'se field in the "SignOutTimeDate" is empty. I have a search text input and a sort button. What I have at the moment on the gallery which works is:

 

SortByColumns(Filter(Visitor_1, StartsWith(Title, TextInput1.Text)),"Title", If(SortDescending1, Descending, Ascending))

 

I am a noob with scripting and am looking for anyone who can help me refine this code so that it will onlys show items in the sharepoint list of people who hasn't signed out yet. 

 

Thanks!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Filter sharepoint list, don't show in gallery items with missing field

Hi Chrom3d,

 

You could consider to combine IsBlank function with Filter function.


According to your scenario, you want to filter the name of people whose field in the SingnOutDateTime is empty.


On an app that is based on SharePoint list, set the Gallery’s item property as:

SortByColumns(Filter(ProjectEmail,IsBlank(Date)=true),"Title",If(SortDescending1,Descending,Ascending))


The all the items which date column is empty will be shown on the app.


About IsBlank function, please check the documentation at here:
https://powerapps.microsoft.com/en-us/tutorials/function-isblank-isempty/


Please to adjust the code according to your needs and let us know if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Community Support
Community Support

Re: Filter sharepoint list, don't show in gallery items with missing field

Hi Chrom3d,

 

Please consider to use And function. About And function, please check the doc at here for more reference:
https://powerapps.microsoft.com/en-us/tutorials/function-logicals/

 

So according to your scenario, you could try to adjust your code looks like below:

SortByColumns(Filter(ProjectEmail,IsBlank(Date)=true&&StartsWith(Title,TextSearchBox1.Text)),"Title",If(SortDescending1,Ascending,Descending))

 

Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
Highlighted
Community Support
Community Support

Re: Filter sharepoint list, don't show in gallery items with missing field

Hi Chrom3d,

 

You could consider to combine IsBlank function with Filter function.


According to your scenario, you want to filter the name of people whose field in the SingnOutDateTime is empty.


On an app that is based on SharePoint list, set the Gallery’s item property as:

SortByColumns(Filter(ProjectEmail,IsBlank(Date)=true),"Title",If(SortDescending1,Descending,Ascending))


The all the items which date column is empty will be shown on the app.


About IsBlank function, please check the documentation at here:
https://powerapps.microsoft.com/en-us/tutorials/function-isblank-isempty/


Please to adjust the code according to your needs and let us know if you need more help.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper II
Helper II

Re: Filter sharepoint list, don't show in gallery items with missing field

Hi Mabel

 

I have no prior knowledge on coding and I have been pulling my hair out on this one but you just solved it with a simple line that actually makes sense! 

 

Thanks so much, that solved the issue for me! 

 

Chrom3d

Highlighted
Helper II
Helper II

Re: Filter sharepoint list, don't show in gallery items with missing field

Hi Mabel 

 

Just a quick question, me being not fluent in coding. The formula you gave which i tweaked worked really well to what I am trying to accomplish with just one hiccup. My original formula is tied up to a text input search box 

 

SortByColumns(Filter(Visitor_1, StartsWith(Title, TextInput1.Text)),"Title", If(SortDescending1, Descending, Ascending))

 

I tweaked your formula which worked perfectly


SortByColumns(Filter(Visitor_1,IsBlank(SignOutDateTime)=true),"Title",If(SortDescending1,Descending,Ascending))

 

But it does not incorporate the text input search box anymore, I know this might be something easy to do but I have no prior knowledge to coding and I am just learning at this stage and if you could help me out, I hope blessing rain on you!

 

Highlighted
Community Support
Community Support

Re: Filter sharepoint list, don't show in gallery items with missing field

Hi Chrom3d,

 

Please consider to use And function. About And function, please check the doc at here for more reference:
https://powerapps.microsoft.com/en-us/tutorials/function-logicals/

 

So according to your scenario, you could try to adjust your code looks like below:

SortByColumns(Filter(ProjectEmail,IsBlank(Date)=true&&StartsWith(Title,TextSearchBox1.Text)),"Title",If(SortDescending1,Ascending,Descending))

 

Hope this could be a reference for you.

 

Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper II
Helper II

Re: Filter sharepoint list, don't show in gallery items with missing field

Hi Mabel

 

I tried it and it worked! Thanks so much, saves me a lot of headache! 

 

I need to read more on the documentation and broaden my knowledge.

 

Kind regards

 

Andy

Highlighted
Regular Visitor

Re: Filter sharepoint list, don't show in gallery items with missing field

I have a similar issue to this I have the whole app working perfect but my leaving gallery shows all items rather than just the ones who haven't signed out, if this is a standard SharePoint list is there a string or command I could copy and paste and then just add the sharepoint list in, I am very new to this and would be great if I could finish this last bit

 

at the moment my Gallery is called LeavingGallery in Items  I have the sharepoint list attached called Visitors and this displays all the people who have signed in and out 

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,954)