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

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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,301)