I want to work a function once in a day

when a user click button first time it show a picture. if the user click the button in next day then the picture want to change. if he click the button once more in same day the picture do not change .
picture only change day basis

a hint, use tinydb and clock, store date, compare on click, if stored date is not same then change picture. try it.

1 Like

wiil you please check this

course is the date storage
courseday is the increase in number

1 Like

why you are using +1 to add day in date? use add days block from clock menu.

1 is not added to date . you can find that db course is storaging date.

db course storing date
db courseday storing a number

clearly i want to show different airtable coulmn for different days . only user get a table for a full day and new table for next day. so i stored a specific number in db courseday . if the db stored course date is not same then +1 is added to db courseday and automaticaly open another screen with this coulmn name

In database save picture of the day and fetch that image whenever user click button…
Change the picture daily

how to get current date

Use clock component for device current date you can use web component or extension to fetch online date and time

Use database to change picture per day

try these blocks. and where i have showed alert data saced, there you can use, change picture. hope it will work for you.

1 Like

@ImranTariq has provided a good solution,…
But, I really didn’t get your idea …
You want to show every user same image by daily basis or you want to show user custom image like one user will see one image today while another user sees another image?

one user will see one image today while another user sees another image-this is my idea

Okay then use @ImranTariq 's idea if worked for you mark it as solution to help others

will you please explain the use of quantity is given as -1

this is for first time, when user open app first time, db will save date of previous day to change image image for user.

when user open first time ,i want to store current date .
is the following is right wayAnnotation 2020-04-07 184530

if current date is stored then compare option will not work, else upon you, what ever you want to do, as you need i provide, else you can do what you want, just understand blocks and make changes what you need to change.

1 Like