I can only respond to the first part of your question, by asking some probing counter-questions:
• What is your data model? Are the photos stored directly in the Inventory table, or in a related table? More to the point: are there 50 container fields defined in the Inventory table, or is there a related Photos table?
• How did you implement the grid display?
So each photo is a related record? That's good.
Add a number field sortNumber to the Photos table and use that to sort the relationship/portals.
You can have the number auto-entered upon creation, e.g. by using a self-join by inventoryID and the expression
Count ( Photos::selfByInventoryID::id ), or
Max ( Photos::selfByInventoryID::sortNumber )
depending on your requirements.
Write a script to automatically reorder the sequence (i.e. rewrite the order numbers) on value change.
"The photos are in a separate related database stored on the local computer"
Well, that doesn't really answer the question.
Which erolst has already asked. HOW are they stored? Is each photo in a separate record?
Or does each inventory record have 50 repeats?
Note that the replace script step in your example file operates on the entire found set.
Each photo has a separate field. When they have the correct order they process the photos which resizes and watermarkes them.
These photos saved in another folder then upload to their website via filezilla. The Filemaker script ends with a request to open filezila or process more pictures
Each photo has a separate field.
Each photo should be a separate record that is related to one Inventory (parent) record.
Nice video, but I don't think that would be that helpful in the example I gave of moving photo 30 to position 2, that would take 29 clicks to do one move. Ideally I would like to be able to drag and drop the photo and have the rest shift. I though a while back I saw an example of this but now I cant find it now.
My solution works with sort numbers. You could also manually enter the sort number.
But I do admit it's not the most elegant solution.
I deal with a lot of inventory photos and web uploads. This is on the right track with the suggestion of an order number. But the only hope is actually modifying the image in each container if you do not have some more complicated portal filtering and sorting going on with multiple portals.
You could implement it with a popover on each image or on the button below that gave further options of import or move position or anything else you want.
You can do this with drag and drop as well. Just script getting the position number of the target and source at the start of an OnModify script trigger. This will allow you to set the order of both and everything in between via script.
BTW If you are using OSX you can upload multiple files via FTP simultaneously using cURL and then easily delete the local files when done using Applescript with a shell script. I have tried Filezilla and I just prefer having the OS do this instead of another application. Seems to be faster and easier.
There are plugins that allow for basic image editing inside Filemaker.
thanks Big Tom.
All my users are on Windows. I had scripted the photos to send automatically via Microsoft. I found that this was unreliable and that it was chocked by some providers. Filezilla has more steps but it is nearly 100% reliable.