Is there a way to run a server connect query after another one completes on a page that doesn’t really have any buttons or actions. Just running in the backround?
Here is what i have…
I have a page that loads a Paged Query to send out emails to clients. Each query returns about 250 emails and sends them out. The page waits about 10 minutes before running the query again.
What i want to have happen is once the query is completed and there are no more results to be displayed in the query…another query will run and reset the database. But i only want this to run after all of the emails have been sent.
Sometimes this page can auto-refresh about 15 times before there is no data in the query, so i can’t have this run each time.
Is that possible? I couldn’t figure out what functions to use to complete this.
i did try to set that up, but the issue i ran into is that the original query that runs every 10 minutes i couldn’t get to loop. I would need to trigger that server connect query every 10 minutes. But the loop function only seems to run it one time.
Maybe i missed something?
the query only produces 250 results each run, so every 10 minutes it produces another 250 until it runs out.
I had to setup a variable in the server query. Then when i ran the Action Scheduler, i had to refresh every 10 minutes with a condition to check for the value of this variable. If the value was 1 then it sent out the emails and continued on.
once the query returned empty results, the variable returned a value of 0. I then had the condition on the Action Scheduler to stop the action if the value of the variable was 0.
Took a little trial and testing to get everything to work as i needed it to, but all is well.