Check for a value on a specific date

Hello!

I'm trying to build a listing function in my app where by a behaviour runs only on a specific date and adds a yes or no based on a particular column. 

Use case:
A customer says they're going to order a product during my visit today. I know their order day is later this week. I want to declare a date to check whether it's listed.

My data feed refreshes daily and I don't want to warehouse the historical data. I thought if I could trigger a function on a user declared day in the future to look for the listing and only run once, it would give me the details I need.

Thoughts?

Solved Solved
0 4 262
1 ACCEPTED SOLUTION

You store dates on a table, run a bot everyday which checks the dates on the table, if there is a date which corresponds with TODAY(), run whatever action required and delete the date from the table.

... is the general idea.

View solution in original post

4 REPLIES 4

Why not just run it everyday and if there is no data to process on a particular day, simply do nothing. 

There will be data on subsequent days and I'm trying to get to unique points.

You store dates on a table, run a bot everyday which checks the dates on the table, if there is a date which corresponds with TODAY(), run whatever action required and delete the date from the table.

... is the general idea.

Well you will always have 2 things the date when the order is placed for the goods and the date the order is to be processed and delivered.

The date for the goods to be ordered will always be in the future and hence any date difference should be negative until the actual date (TODAY() )and date of delivery are the same and the difference will be zero.

Hence any trigger or function must be activated either a day before or on the day when the diff is -1, or 0 for example.

You just have to decide on what day or how many days before the order date your trigger needs to be valid.

You can create a view based on all orders that satisfy this trigger and display all the orders and their details based on the trigger.

Hopefully, this will do the trick.

Top Labels in this Space