Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

multiple portals - record creation issue


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

Recommended Posts

Posted (edited)

Hello

I have a layout which has 2 portals on it. The first portal is the child of the overall layout table and the second portal is the child of the first portal.

The database record creation configuration is set to match this: the overall layout table has record creation ability in the first portal and the first portal has record creation ability in the second portal.

The problem I am having is when I add a record the second portal, a record automatically gets inserted in in the first portal--its parent. However, this should not be happening since the child has no ability to create records in its parent.

I can separate the portal tables on different layouts, but would rather keep everything on one layout.

Any ideas?

Edited by Guest
Posted (edited)

That's how it's supposed to work. Because the relationship from parent to grandchild goes through the child, you cannot create a new grandchild from parent without having a child in-between. It's a matter of relationships, not of portals.

If you want to create orphaned grandchildren from a parent layout, you will need to establish a new relationship between the parent and the grandchild directly.

Edited by Guest
Added clarification
Posted

I didn't say you need to modify the existing relationship - I said you need to create another one. I am not too sure what's your purpose here, so I don't see how a new layout would help.

Posted

A new layout is not what I am looking for, however, I just tried adding a new relationship between the grandparent and the grandchild (parent -> child) with the existing relationships between all 3 intact. In doing so, I created a new instance of the grandchild table, however that did not work.

Posted

[color:purple]In FileMaker, there are typically several different ways of doing the same thing. Although a relationship is one way of handling your situation, you can also make an end-run around all of this by making changes/additions to the table script- and button-driven. I use scripts in the background all the time, although the databases I work on are usually quite complex and often the number of changes needed can't be handled by a relationship alone.

In your case, I don't have enough time to analyze your tables for you, but it sounds like something so simple should be handled by relationships. And making a new layout isn't that big of a deal unless you're talking about copying everything on the other layout over, with most of the fields coming from a different table.

If you're talking about reworking a complicated layout, you might want to evaluate whether the new layout alone is a better choice, or a layout-script combo would serve your purposes better (meaning the new layout is simpler, and the script just goes there and makes the changes in the background).

Which is best is a matter of experience. After you've been programming for years, you'll know instinctively which is most efficient, user-friendly, and best suited to handle modifications going forward. Until then, it'll be a good learning experience.

???

Posted

I created a new instance of the grandchild table, however that did not work.

"Did not work" is not a good description of a problem. And we still don't know what is the purpose behind this.

Posted

The layout is not that complicated, however, I would like to keep things on one layout.

But because I do not have much time and I have yet to figure out what the issue is, I may go with putting the other portal on another page.

Posted

I added a second relationship from the grandparent to the grandchild. This created a new instance of the grandchild table.

When I go to the layout and display the original instance of the child table, nothing has changed--when I create a new record in the grandchild table, a new record also gets created in the intermediary table.

When I display the second instance of the child table on the layout (the one with the relationship to the grandparent), the first record in the grandchild table is displayed multiple times and no other records show up. I also cannot create any new records in the grandchild table either.

Posted

This is very hard to follow, but it looks like the fields in your new portal (to the second occurrence of the grandchild table) come from the FIRST occurrence of the same table.

Posted

Again, I don't follow. You need to change the fields in the new portal to point at the correct TO - did you do this?

Another thing that's not clear is what is the direct relationship between parent and grandchild based on? Perhaps you should attach your file, and explain what exactly are you trying to accomplish with this structure.

Posted

That was it--I had changed the portal to reflect the second instance of the table, but did not change the individual fields to reflect the second instance of the table. Thank you..

One quick question: when you have two instances of a table, I'm assuming that the actual data is the same between both instances?

This topic is 6020 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
×
×
  • Create New...

Important Information

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