Make changes to a specific amount of data

I have 36 entries in my database “RouteCard”, and they all have the same “Item Number” but different “Process” where the “Process” is repeated.

It started with the original 6 entries of:

  • Item Number: 952x028x190-IGT118 | Process: Spin
  • Item Number: 952x028x190-IGT118 | Process: ILA
  • Item Number: 952x028x190-IGT118 | Process: IGT
  • Item Number: 952x028x190-IGT118 | Process: LWC
  • Item Number: 952x028x190-IGT118 | Process: CAF
  • Item Number: 952x028x190-IGT118 | Process: Packing

Then each of these were multiplied 6 times, as seen in the screenshot below:

I then have another database called “Spinner Blocks”, where the entries there contain the same “Item Number” as each other and in the database “RouteCard” (as seen above) but each have unique “Shell IDs”.

What I have been trying to do is assign a unique “Shell ID” to every 6 entries in “RouteCard” databases. The 6 entries being the list above. For example:

  • Item Number: 952x028x190-IGT118 | Process: Spin | Shell ID: 250507-1-001
  • Item Number: 952x028x190-IGT118 | Process: ILA | Shell ID: 250507-1-001
  • Item Number: 952x028x190-IGT118 | Process: IGT | Shell ID: 250507-1-001
  • Item Number: 952x028x190-IGT118 | Process: LWC | Shell ID: 250507-1-001
  • Item Number: 952x028x190-IGT118 | Process: CAF | Shell ID: 250507-1-001
  • Item Number: 952x028x190-IGT118 | Process: Packing | Shell ID: 250507-1-001

Then the next 6 entries:

  • Item Number: 952x028x190-IGT118 | Process: Spin | Shell ID: 250507-1-002
  • Item Number: 952x028x190-IGT118 | Process: ILA | Shell ID: 250507-1-002
  • Item Number: 952x028x190-IGT118 | Process: IGT | Shell ID: 250507-1-002
  • Item Number: 952x028x190-IGT118 | Process: LWC | Shell ID: 250507-1-002
  • Item Number: 952x028x190-IGT118 | Process: CAF | Shell ID: 250507-1-002
  • Item Number: 952x028x190-IGT118 | Process: Packing | Shell ID: 250507-1-002

and so forth for each “Shell ID” in the “Spinner Block” database making changes to the “RouteCard” database. So far my API workflow only changes all 36 entries to one “Shell ID”.

How would I go about doing this?
Thanks!

STEP 1: Create a backend workflow

API Workflow Name: assign-shell-to-routecards

Inputs:

  • Shell ID (text or Spinner Block Thing)
  • Start Index (number)

STEP 2: Inside that workflow:

Do a Search for RouteCard

Constraints:
- Item Number = [fixed value or pass as input]
Sort by: Created Date (or another consistent sort)

Then:

:items from Start Index to Start Index + 5

:counterclockwise_arrows_button: Loop through these 6 items and Make Changes to a Thing → set Shell ID = input Shell ID.


STEP 3: Schedule that backend workflow for each Spinner Block

In your front-end workflow:

Search for Spinner Blocks:sorted
→ Schedule API Workflow `assign-shell-to-routecards` on a list

Inputs:
- Shell ID = This Spinner Block's Shell ID
- Start Index = (This Spinner Block's List Index - 1) * 6 + 1

:light_bulb: If you’re not using list scheduling, you can loop manually using “Schedule API Workflow” in a recursive way, but using “Schedule API Workflow on a list” is easier if the Spinner Block list is fixed.


:bullseye: Example in practice:

Spinner Block 1:

  • Shell ID: 250507-1-001
  • Start Index: 1
  • RouteCard entries 1–6 get this Shell ID

Spinner Block 2:

  • Shell ID: 250507-1-002
  • Start Index: 7
  • RouteCard entries 7–12 get this Shell ID

…and so on.

I don’t understand step 2 really, where do I do “Do a search for”, is that when I make changes to a list of things?

Same thing with step 3 I don’t fully understand.

I am aware this is a ChatGPT answer which I have tried to utilise with this problem, but it misses key terminology and referencing on exactly what I should be doing as I don’t know what it refers to half the time.

Thanks for your input though!

Dont think you need a backend wf for this, just create a test page and use a workflow repeater plugin. You can set up a repeating group in this test page to show only the desired itens filtred however you like and live preview all these changes in the front end. Ive done data manipulation like this many times, just dele the page after you done with it

Demo

Editor

Try this alternate solution~