cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Paul_dfb
Helper I
Helper I

Clear data from gallery

Hi all. I am building a very simple attendance scanning app. When the instructor scans a bar code it populates a gallery and a share point list.

All this is working fine. However i want the app to have a blank gallery every time the instructor opens it, in other words i dont want them to see the previous days records in the app.

 

I cant seem to get the gallery to clear all its data. 

Paul_dfb_0-1643297570400.png

 

 

Thanks for the help

Paul

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@Paul_dfb 

What is your Items property for the Gallery?

If you are only concerned with showing "today's" records, then your formula should be similar to the following:

Filter(yourDataSource, Created >= Today())

The above is based on the created date, so specifics would be based on your list columns as to what you want to filter on.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

7 REPLIES 7
Nogueira1306
Super User
Super User

Filter the gallery to only show Today

Filter(DataSource, Date = Today())

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

fuzzy_fuzz
Resolver II
Resolver II

On the OnStart function create a now variable

Set(varNow; Now())

Then filter the items

Filter(
    SPList;
    varNow < DateColumn 
)

Thanks for your reply. i have added the filter, however it is now showing no information as the bar codes are scanned?

Filter(DataSource, Date = DateAdd(Today(),0,Days))

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

Last Post on Community

My website!

unfortunately that doesn't seem to be working. 

this is all i see when using the app. This is after scanning. the items are still going to the sharepoint list. 

Paul_dfb_0-1643300491889.png

 

RandyHayes
Super User
Super User

@Paul_dfb 

What is your Items property for the Gallery?

If you are only concerned with showing "today's" records, then your formula should be similar to the following:

Filter(yourDataSource, Created >= Today())

The above is based on the created date, so specifics would be based on your list columns as to what you want to filter on.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Thanks a million for that. It is working fine now. It is just showing today's scanned info which is all i need. 

Thanks for your help. 

Helpful resources

Announcements
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.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,169)