I have a data base with a type of Events. some of the fields are:
Date
Recurring Frequency
Max Recurring Limit
Recurrence Count>
I want to change the date of an event when current date/time > date. And also when the event is recurring and the max recurring limit has not been reached. I have tried to do this with the normal workflows but the appropriate fields that I need to do the conditions don’t show up.
I have read up on backend workflows and I am still stuck. Please help.
I managed to set up a recurring event on the backend workflow, but it only takes a type of thing (not a list like a need). I don’t think a database trigger will work for my use case. And I couldn’t also see teh right fields I needed for my condition on API workflows.
HI @ihsanzainal84 it’s every 24hrs. Is there another way I can do it. I just need a way to update the dates of recurring events if the previous date they had has passed.
I do a search with constraints on the first step, then do this on the second step for events that their recurring frequency is daily.
Have Recurring Event on the Event type. Then when you create an event, if it’s recurring create a Recurring Event and assign this Recurring Event to all of the new events you create.
To update recurring event when it’s passed, then schedule an API workflow when
the Event is created that will run at the event’s finish time.
HI @adamhholmes I tried to use a backend workflow, but I couldn’t see “This Event”> I need it to check this condition “Recurrence Count < This Event’s Recurrence Max Limit”. The condition checks if the event has recurred the max number of times it is supposed to. Is there something that I am missing?
@georgecollier I tried to create a backend workflow, then when I tried to bring it to the frontend to trigger it, I noticed it only accepted a type of thing and not a list (mine is a list of events). So recurring event didn’t work either. Did you mean something else? Please see the attached screenshot.
Thanks @georgecollier I’ll check out the docs now and see if I can get it to work. I didn’t understand what you mean by generating a random ID. Maybe I’ll understand after checking the docs.
When you create a recurring event (e.g starting tomorrow and recurring 10 times), you should actually create 11 single events. Each event should have an ID / unique string that shows they’re all related. It’s not a Bubble feature, it’s just database design.
When you create the events, calculate random 64 character string and assign that to an eventID variable in all of the events you’re creating for the recurring event.
If you want to update a recurring event, you just search for all events in the future with eventID = This recurring event’s ID.
I have managed to get the API workflow to work now. What does the number in the intervals mean? Is it the time before it runs the workflow on the next record? (Eg Run for first item, wait 3 seconds, run for second item, wait three seconds, run for third item…) or is it the frequency it runs the workflow on the whole datathing?
I ran into another problem. Added these conditions in the backend workflow but records that don’t meet these conditions still get updated. I don’t know why that is happening.
You might want to start from basics to learn about backend workflows before circling back and implementing something like this which is more challenging