Jump to content
Server Maintenance This Week. ×

Creating related records in a portal using a script


Trike Mike

Recommended Posts

 

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

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 by Trike Mike
added later note
Link to comment
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.