8it2
September 24, 2018, 11:24pm
1
I am seeking to set a different incremented date/time with each thing my scheduled workflow creates.
The time should increment by “x” seconds multipled by “y” created thing in the scheduled workflow’s list.
I’ve read many posts and done my best to explain this need in the simplest way possible…
Any ideas how I can accomplish this?
Here’s a visual:
CountVar = 0
Increment = Userset
Thing # | Date & Time
1 | 201809240800 +(seconds): [(Increment * CountVar)] = 0
----------------------------- Increment CountVar + 1 -------------------------------
2 | 201809240800 +(seconds): [(Increment * CountVar)] = Increment
----------------------------- Increment CountVar + 1 -------------------------------
3 | 201809240800 +(seconds): [Increment * CountVar)] = Increment * 2
etc…
1 Like
mishav
September 25, 2018, 3:58pm
2
Maybe you could use Toolbox’s List of Numbers to generate the list to send to the workflow …
1 Like
8it2
September 25, 2018, 4:03pm
3
Thanks for the idea - I’ll give it a go and let you know.
8it2
September 25, 2018, 4:15pm
4
@mishav is there anyway to create this list in workflow event? or is this only a UI item?
mishav
September 25, 2018, 4:20pm
5
Its a client-side element. I thought it might be appropriate to generate at the time the user’s increment (or excrement) is captured.
To do something similar in the API workflow would need one of:
recursive workflow
server-side script plugin (still in beta)
external API
conditional calling custom events, if the number is fairly small
8it2
September 25, 2018, 4:23pm
6
How do you see accomplishing this with custom events?
mishav
September 25, 2018, 4:26pm
7
custom events … its not elegant …
if num > 5 call dofiveofthem
if num mod 5 > 4 call do oneofthem
etc…
8it2
September 26, 2018, 11:23pm
8
Update - solved this challenge by creating a customized counting table and setting the scheduled api workflow interval to 30, which seems to be enough time to not compete with the other workflow items.
Ugly workaround IMO, and hopefully the Bubble time will work on a few things:
Dynamic scheduled workflow api
Data processing order reliability (which is now important with the introduction of recursion).
mishav
September 27, 2018, 1:35am
9
Good result!
Funny you should mention this, because:
Hi all,
We had previously restricted scheduled API workflows from scheduling themselves (or scheduling another workflow that then scheduled itself). This restriction is now removed.
Recursive scheduled workflows can be useful in situations where you are processing an unknown quantity of data that might be quite large. For instance, the following workflow will make sure every Thing in your database has been processed within 7 days:
[39%20PM]
[45%20PM]
Processing data this way is generall…
Workflows run one at a time
Workflow can check if there is more data to process, and do something else if there isn’t
More reliable for long lists