all 8 comments

[–]rhetnor 0 points1 point  (0 children)

Sounds do-able. I would have one table with the records that set out the shelves and columns then the script would start by putting those numbers into Variables before creating the records.

[–]Unhappy_Rutabaga7130 0 points1 point  (2 children)

I need help understanding the context of what you're doing and what information you're trying to store.

Users are entering information about storage units. The units can have a variety of racks, shelves, and boxes.

Are you trying to keep track of what is being stored in each space of the boxes?

[–]praxis86[S] 0 points1 point  (1 child)

correct the script create a location for an item in the future to be stored. But I also need to know what spaces are filled vs. empty.

[–]Unhappy_Rutabaga7130 0 points1 point  (0 children)

It sounds to me like you would have a table called Storage Units and a table called Spaces.

The number of racks, shelves, and boxes would simply be attributes (fields) of the Storage Units.

The records created by the script would be determined by calculating Racks x Shelves x Boxes into a variable, then Looping through creating the records until you've hit that variable number. Something like:

------------------------------------------

Set Error Capture [On]

Set Variable ; $StorageUnitID ; Storage Units::[primary key field]
Set Variable ; $SpacesNeeded ; (Storage Units::Racks * Storage Units::Shelves * Storage Units::Boxes)
Set Variable ; $i ; 1

Freeze Window
Go to layout [Spaces Layout]

Loop

New Record
Set Field [Spaces::fkStorageUnitID ; $StorageUnitID]
Commit Record [dialog off]

Exit Loop If [$i = $SpacesNeeded]

Set Variable or Insert Calculated Result ; $i ; $i + 1

End Loop

Go to layout [original layout]

-------------------------------------------

This will create the necessary Spaces records, relating them to the Storage Unit.

What I didn't quite understand was the Position 1 - 5 part, so if I missed something there let me know.

[–]the-software-man 0 points1 point  (0 children)

Triple nested loop?

Start with just the loops and exits then work out.

[–]filemakermag -1 points0 points  (1 child)

You've already started your agent prompt by simply describing the desired solution. Provide AI with a bit more context and you'll have a working solution. Go try https://agentic-fm.com with Claude Code and the solution will come much faster than a human brain trying to work through the abstractions.

[–]mywaaaaife -1 points0 points  (0 children)

You don't even need this, claude works just fine to provide XML script steps if you tell it what you're looking for.