Jump to content
Sign in to follow this  
nakris

Portal only allows creation of records in order?

Recommended Posts

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?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

in my experience, copy & paste is difficult to truly control and count on. As they say #$%& happens!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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