Jump to content

Portal only allows creation of records in order?


nakris
 Share

This topic is 7487 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Here's the situation:

Items.fmp = inventory items

Quotes.fmp = quotes for item prices

Vendors.fmp = vendors

Prices.fmp = inventory items with a quoted price added and an associated vendor

In Quotes.fmp, I have three portals. Two list All Vendors and All Items, respectively, with transparent buttons over the portals that Copy IDs and Paste them into the appropriate fields. The vendor ID is pasted into Quotes field(vendor_ID)(one vendor per quote) - this part works flawlessly. The Item ID is pasted in the third portal, prices, into the field Item_ID.

Here's the catch: this, too, works fine, but ONLY if you select each consecutive Item in order, starting from the first. In other words, clicking on the (transparent button over the) All Items portal will work if you click the first record, then the second, then the third, etc. It is impossible to skip a record or start anywhere other than the first record. I originaly had the All Items portal sorted by item name for convenience, but removed the check in the sort box of the relationship dialog, thinking that might (somehow) be causing the problem, but the same problem persists, except with the new sort order. (if Items are listed A-Z, you have to click A, B, C, etc.; if they're listed Z-A, you have to click Z, Y, X.

This is probably something simple, but it seems bizarre to me. Any help?

Link to comment
Share on other sites

Without seeing what your script looks like, it's hard to say for sure. A common problem is that as soon as you leave a portal, Filemaker forgets what row you were on. So, the first thing your script must do is capture the portal row, or the ID of the respective related record. You can do this with a Set Field command to set a global field in you main file to either the current portal row, or the unique ID number of the related (portal) record.

Link to comment
Share on other sites

  • Newbies

Thanks for the help! The global field was just the ticket. I'm still not at all sure why it didn't work the other way, but it's working now. My old script just used Copy and Paste, btw. The new script sets the global field when a record in the first portal is selected, then sets the field in the related database.

Link to comment
Share on other sites

This topic is 7487 days old. Please don't post here. Open a new topic instead.

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
 Share

×
×
  • Create New...

Important Information

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