How to Bulk Modify a List of Things

My app allows users track Materials through various steps of procurement. Each Material has a “required delivery date” field and the value is constantly changing based on project schedule updates (using an external tool/software). My users are currently able to modify the date values manually for each material, but this requires lot of time and clicking for users who have dozens and dozens of mateirals to update each week.

I would like to create a workflow that allows users to update the required delivery date for each of their materials through a CSV upload. The CSV would contain a list of materials with the corresponding updated “required delivery date”. A workflow would run where it would modify the “required delivery date” for each of the materials in the database that are listed in the CSV with the updated date value found in the CSV.

I’ll be honest and say I’ve fiddled around with the CSV upload work flow and an API workflow, but I don’t really understand API workflows very well and everything I try doesn’t work. So, I’m not sure even where to start.

I’m thinking I need to have two lists - one containing the values in the CSV and the other containing the list of materials I want to update, both sorted the same way (so they match). The next step would be something like “take the date value of the first item from the first list and put it in the date value for the first item in the 2nd list and do this for the entire list”. But, I have no clue on how to do this (or even if this is the right way to go about it).

Any suggestions/ideas? Thank you in advance.

Have you watched this video?

Yes, I’ve watched that but thanks for providing.

I’ve actually made some progress with the workflow today, but am still running into an issue. Here’s what I have built:

  1. The user uploads their CSV file containing four columns of data: ProjectCode (a 6-digit code associated to the project that the materials are associated to), ActivityID (unique id that corresponds back to their external project software), schedulestartdate (the date from the external project schedule software they are wanting to upload), and Notes (text).
  2. The user then clicks “upload” and the data from the CSV file gets uploaded as a data type called “tempmateirals” which are displayed in a hidden repeating group.
  3. The user then clicks “Continue” and this workflow runs

The API workflow Endpoint looks like this:

  1. Last step of the workflow is deleting the list of “tempmaterials” that were created in #2 since they are no longer needed.

Here’s the problem: When this runs, the Material’s “schedulestartdate” and "Note"s values are not entered and get overwritten with a blank value. Also, in a couple test runs I’ve seen the Notes value get populated for one of the materials but not the others. So, I’m getting inconsistent results.

In an effort to isolate the problem I decided to remove the “ScheduleStartDate” from the ‘Make changes to Material’ step in the Endpoint, and sure enough the “Notes” values are entered into the Material from the TempMaterial just fine, every time.

So, Bubble doesn’t like something’s about the “schedulestartdate” date value in the “tempmaterials” even though it is uploaded into the database just fine.

Any ideas on this? Has anyone else run into issues with date values like this?

This topic was automatically closed after 70 days. New replies are no longer allowed.