Hi all,
So I have an app which has a few different routes which bus drivers use- its exactly the same drop off and pickup times when they complete a route- so drivers simply select a day and their established list of dropoff and pickup times copy over to the newly created route- but on the new day. This means on the data type I need to make changes to a list of things, and change the date, but NOT the time of each stop.
I can see there is the perfect workflow action called change date (day) to which changes the date but no the time of an individual date- however, this isnāt available to do to a list of things. I need a way to take the list of āstopsā and do the change date (day) to all of them while keeping their time. It seems like the perfect workflow action but I cant get it to change the date to the whole list.
Screenshot attached shows me changing data type ātimeā- the first attempt you can see the option to change date (day) to a single item in the list- but the second shows the workflow action isnt available when attempting to make the change to a whole list. (FYI, step 2 is ācopy a list of thingsā which is a list of the stops).

To change the date for a list of āstopsā while keeping their time, youāll need to loop through each stop individually using a āSchedule API Workflow on a Listā action. This way, you can apply the āchange date (day)ā action to each stop in the list. Unfortunately, thereās no direct way to modify the date for an entire list at once.
Thanks mate, any chance you have an example of what that schedule api workflow would look like for it to go through each stop and change the date? Thanks
I think itās a waste of WU for something so simple. I needed a break and decided to make a plugin for you as practice.
TCH - Change Dates Plugin | Bubble
It does what you want, take a list of dates and changes it to the new date. Itās a simple action that runs a simple function. I included a WF trigger for when the conversion is done.
Disclaimer, I do use AI to help me write code but itās only because I cannot be bothered to remember keywords and methods.
Hey mate thank-you so much its exactly what I need. I cant quite get it to work currently.
The workflow looks good, in the step by step it works perfectly but its not changing the database. I placed the element on the page and then used the workflow action called tch. Am I missing something? Thank you

Youāll still need to run āmake changes to a thingā and use the new dates from the plugin as the value for the list of dates you want changed.
To ensure that the plugin has completely run, you can run the āmake changes to a thingā as an action in the āTCH - List of Dates Completedā event workflow.
Does that help?
I can see how to use the element action now and Ive saved the list of new dates as a state, I cant see how to āmake changes to a list of thingsā and replace all the old dates with the new ones though.

Ah I misunderstood your original post a bit. I thought you wanted to change the field values of a list of dates of a Thing. If all youāre looking to do is change a single date but keep the original time all you have to do is write the expression as such:

New date, change hour to original date extract hour, change minute to original date extract minute.
hey mate I cant quite work that out, could I take a look at your editor? Ive never seen the command āchangeā before

Thanks for sharing, in your example it looks like you are only changing a single date and a single time. I have a list of 30 times throughout the day and all of those seperate times need to have just their date changed but the individual times kept the same. From what I can tell you are extracting a single time. When i try to use the āchange date toā command it only works on a single thing not a list of things.
Any help would be so so much appreciated, thanks
Hey mate looks like this is my best option, im having trouble getting the workflow to work. My plan is to use the api backend workflow and like you said trigger it to run on the list. I cant get the workflow logic to allow me to change date too though.

So Ive created a backend workflow which should use 2 states which are numbers to replace first the day, then the month of the dates without the time, however I cant workout why it wont run. Screenshots attached- How can i debug or test backend workflows like the step by step feature to diagnose the problem? Not sure where ive gone wrong. Ive tested the workfow logic on the page for a singular date and its worked, just donāt know where its going wrong when using the backend api which i need to use because I need it to run on a list of things.

I updated the plugin to include backend action. So you can create an API workflow that will take the current list of dates of the stop then change it all to a new date. Then just use the Schedule API WF on a list action, client side.
Try it out and I hope that helps. Look out for timezone differences.
Hereās a sample Schedule API WF on a list action. As you can see, make sure to add the necessary parameters.
Hereās the API WF
Hereās the plugin action in the API WF

Thank-you very much for the help- I have followed the above exactly, the only different is at the end screenshot you make changes to a thing after using the TCH change dates. For me, after the change dates I need to make changes to a list of stops. Does the TCH change dates actually make the change itself? Or do i need to use make changes to a list of things after it? I cant get the list of things option to work with the result of the TCH change dates workflow.
The plugin action only takes a list of dates (these include your time), runs some javascript to convert all the dates to a date of your choice, without affecting the hours and minutes. Then it outputs the new list as a list of dates. The plugin itself will not make changes to your data, simply put no plugin can do that.
So what you do is create an API workflow that takes a single stop as a parameter, then add 2 actions. My plugin action (which will convert the Stopās current list of dates) and Make changes to a Thing (this will change a Stop ). In the fields to change your Times field (which I assume so far is a list of Dates) and set list to āResult of Step Xās new listā (this points to my actionās plugin.
To edit multiple stops you use a Schedule API WF on a list action from wherever.
Man I hate to make things difficult, but I have a list of things (stops) and each different thing has a date. So its not that each stop has a list of dates rather I have a list of stops who all have dates. With that being said I tried to use the plugin and then make changes to a thing as per my screenshot. I need to make changes to a list of stops, each stopss date.

So your Stopās Time field is a single date value?
EDIT: If it is then you should have no issue accessing the change to date/hour/minute expressions and you wouldnāt need the plugin.

That has worked thank-yuou very much- your plugin has other uses in my app.
1 Like