This is completely possible to do using scripts. FileMaker is meant to be easy to get scripts written, relationships set up, and layouts created, but it still needs some actions, so you do need to write the script to get it to function.
Your request is possible. One or two scripts should suffice. Would you like some guidance in that?
Here's what I'd do:
1. Assuming you're using FM 13 or greater, I'd create a popover on the layout.
2. Create a field called "Categories" in this Vendors table. Make it global. Put it inside the popover.
3. Create a value list that shows all the possible categories. Set this global field to this category.
4. Inside the popover, a button is needed that will run a script called "Set categories".
The script "Set Categories" needs to do some work. It needs to get all the values a user selected and create a child record in the join table. It would grab the ID of the current-record vendor, go to the join table layout and create a record for each category selected using a loop and GetValue() function. Then it would go back to the original layout (the vendors). Finally it would clear out the global field so as to reset for the next vendor.
After that a new record would be in the portal for each selected category.
Thanks. I'm in FMP 13 so I should be good to go with your suggestion.
I was pretty sure I'd need to do something like this.
Appreciate your reply.
Your idea worked fine. Works great in fact.
I'm amazed how awful the FMP script interface is compared to any real programming IDE. Not object oriented, no "initellisense" (of course, since not OO), zero refactoring (not even search & replace, SERIOUSLY?), etc. Plus the terrible script interface itself. Just mind boggling slow and cumbersome.
Plus the script debugger, data viewer are somewhat model vs. other windows so you can't always open them. Data viewer isn't really good for evaluation unless you close lots of windows.
Well, I know they changed the script interface in 14, but, well, doesn't really address much in my view ....
Appreciate your reply. I was basically trying to do a sanity check to make sure I needed to do the scripting and not having missed an easy way FMP already does things.
I was probably a bit too critical of FMP above. FMP is actually an amazing product, which I use for many, many things. Although I don't use it for production work, it's an amazing product and I'm glad I have it!
Quick user interfaces and the ability to tie things together quickly with scripts, etc. make it a super usable product.
I'm hoping that FMP 15 addresses some of the things I've been hoping for since version 11.
Because of all the great FM users, this forum is one of the best, with the best peer user support, on the Internet.