Jump to content

Opening an object with a portal row


Alex Quinlan

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

Recommended Posts

Hi,

 

I am struggling to achieve what I thought would be a simple button script.

 

 

My company table's layout has a portal showing the related personnel through the field - "company_id" in the personnel table. It also has a popover with a second portal which I use to enter the details of the personnel for that company record.

 

I would like the popover, when I open it through the popover button, to go to a new personnel record.

I would also like  the "edit personnel" button, which is positioned on each row, to open the same popover but go to that portal row.

 

 

At first I had the popover open with a filter on the portal for If [isEmpty (Personnel::First)] which, although ugly, achieved what I wanted. But I think I have to remove that in order to get the edit personnel button to work. So now i'm not sure how to even get the popover to open with the portal aiming at a new record.

 

For the edit personnel button I tried a few methods. My most recent attempt was -

 

Set Variable [$row; Value: Get (ActivePortalRowNumber)]

Go to Object [Object Name: "Add New Personnel Portal"]

Go to Portal Row [No dialog; $row]

 

Which obviously didn't work or I wouldn't be here. :)

 

Any help would be greatly appreciated.

 

Thanks

Link to comment
Share on other sites

"My company table's layout has a portal showing the related personnel through the field - "company_id" in the personnel table. It also has a popover with a second portal which I use to enter the details of the personnel for that company record."

 

You cannot have a portal within a portal. So, if you have a popover button in a portal row, that popover cannot contain a portal.

 

Not clear as to why the related fields for the personnel record require a portal. To me, I would have an Add button (could be a popover) above the portal, and an edit button, also a popover, that shows the related employee fields. Don't use the same popover for both.

Link to comment
Share on other sites

Thanks for the replies.

 

I didn't explain myself properly - I mean't to say that I had a popover on the layout, not in the portal itself. In fact I didn't know you could have a popover in a portal; filemaker is ace :D.

 

To me, I would have an Add button (could be a popover) above the portal, and an edit button, also a popover, that shows the related employee fields

 

How do you get a popover to show related employee fields without a portal? Thanks

edit - ignore - long day, misread your statement.

 

Eos,

Thanks I've had a brief glance and I think i can pretty much apply this to my own database. However, I see the staff_create portal off to the side. I dont understand how it automatically positions itself within the popover though.

Link to comment
Share on other sites

Hi eos

See here for an example (which, actually, uses just one popover 

That’s a nice example you provided, and should be helpful to others in the future.

 

This has actually became one of my favorite features in 13.

Edited by Lee Smith
favorite features
Link to comment
Share on other sites

I've had a brief glance […] I dont understand how it automatically positions itself within the popover though.

 

Maybe take a longer glance …  :laugh:

 

There is no automatic positioning going on; the portal in the popover does not display records from staff_create, but rather is a one-row version of the visible staff portal, filtered with the selectedStaff field.

Link to comment
Share on other sites

  • 2 months later...

You cannot have a portal within a portal. So, if you have a popover button in a portal row, that popover cannot contain a portal.

Oh - I've just started to do this and it seems to work fine.

Is this new to V13, or am I blindly walking into a whole new world of chaos?!!

Link to comment
Share on other sites

Many thanks - as far as I could tell, it did work OK, but it wasn't hard to move it alongside the initial portal rather than inside it.

I'm not really sure why I didn't do that in the first place really!!

 

Cheers :-)

 

Mike

Link to comment
Share on other sites

To clarify, you CAN have a popover button in a portal row. This is a nice UI for editing portal rows. Just show the related record in the popover.

 

You cannot have a popover button that contains a portal in a portal row (or a popover that has a slide panel). That would be a portal in a portal. What you do when you need this functionality is to "fake" it. Have a button in the portal row that opens the popover that has a portal. This popover sits outside of the portal. Drive the data you show in the popover portal by setting a global field.

Link to comment
Share on other sites

This topic is 3350 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.