Trike Mike Posted September 12, 2023 Share Posted September 12, 2023 I'm making a database of customers and inventory items to sell to them. I've created a file of work orders, which would contain a portal to line item records, each line item linking to the work order number, with a line item for each item sold, quantity, cost, etc. This seems pretty routine. I've created a script run from the work order file that runs a script in the line items file. This script does what is needed, linking to the work order with the requested item info. The problem is that when the script is done, the line item created, and the user is returned to the work order screen, the new line item does not appear in the portal. It will only appear when I create another line item. Then the previous line item appears, but the new one does not. I could likely solve this by a kludge, but I'd rather address the problem keeping the new line item from appearing. Any advise? Link to comment Share on other sites More sharing options...
Ocean West Posted September 12, 2023 Share Posted September 12, 2023 name the portal object and refresh the portal object after you return to the record. https://isolutions-inc.com/free-filemaker-templates/ may have some templates you can dissect to see if there is something for inspiration. Link to comment Share on other sites More sharing options...
comment Posted September 12, 2023 Share Posted September 12, 2023 35 minutes ago, Trike Mike said: I've created a script run from the work order file that runs a script in the line items file. You have separate files for work orders and their line items? Why? Link to comment Share on other sites More sharing options...
Trike Mike Posted September 13, 2023 Author Share Posted September 13, 2023 (edited) Ocean West: Thanks! But unfortunately I can't inspect the iSolutions Invoice Solution with FM14. Are there older versions of these? And... I did name the portal and ran Refresh Portal from within the Work Orders file, but it didn't seem to help. I'll keep poking. Anonymous member: Back in the days of Olde, when I was using Filemaker 5 for a lot of things, that's how it was done. I see there is a method now that makes a true database file with multiple tables (customers, items, orders...) all within that file. But I had more trouble creating relationships between those tables than I did crating them between separate files. So I fell back to my olde habits. Edited September 13, 2023 by Trike Mike added later note Link to comment Share on other sites More sharing options...
comment Posted September 13, 2023 Share Posted September 13, 2023 8 hours ago, Trike Mike said: I see there is a method now that makes a true database file with multiple tables Why yes, it was one the new features of version 7 in the year 2004 (does that still count as "now"?). Maybe it's time you took advantage of it; it will make a lot of things easier, besides solving your current problem. Now, I would need to see your scripts to be sure what the actual problem is. Based on your description only, my first guess would be that the script in the line items file creates the new record, but does not commit it. Make sure it includes a Commit Records step after creating the new record and populating its fields. My second guess would be that this is indeed a refresh problem. But you may have to refresh the entire window and also select the 'Flush cached join results' option. And you must make sure that the refresh occurs after the record was created and committed in the other file. P.S. Anonymous? Link to comment Share on other sites More sharing options...
Trike Mike Posted September 13, 2023 Author Share Posted September 13, 2023 The Commit Record step was the key. Thanks. I'd be happy to combine these files into one Database file, but it isn't clear how to do it. Even without it I seem to have some novel ways of using data from completely different files. Your user ID is "comment," which makes it appear like an anonymous comment. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now