Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi- I have a portal with too many fields. I have read of a solution where you can select a row in a portal and more information about the item (or person) appears in related fields next to the portal. I am not that fluent with FMP and the instructions were not laid out step by step in the book I read. Would anyone be able to help me with this solution? Thanks in advance.

Posted

I think what you are thinking of is having two side-by side copies of the portal. One of which has a number of rows and the other shows a single row with a "mini-layout" inside.

I am not aware of what you have read but I have implemented such a thing in a layout. As the portals are into the same table ocurrence you need some way of going from one to the other and that means having a field in the single row portal which is not in the multi-row portal. You also need a field to store the portal row number PortalRow

Suppose the individual field in the single row portal is called Marker and you have a button (which can be a field) when you click the button run the following script

SetField[PortalRow;Get(PortalRowNumber)]

Go to Field[Marker]

Go to Portal Row[No Dialog; PortalRow]

The first line reads the portal row which you have just clicked and stores its number. The second step moves to the other portal and the final step goes to the same portal row number (the record then shows up in the mini layout.

To make this work I have both portals with the same sorting applied and both portal set up with a vertical scroll bar.

Posted

Hi niessen,

You can create a one-on-one relationship from your main table directly to the selected portal row. In this way, a second portal is unnecessary. Basic Process:

Create a global (text) gRelatedID in Main. Create another table occurrence of your related portal but name this relationship 'Selected Related.' Join gRelatedID to Related::RelatedID. Place fields from this NEW relationship directly on your Main layout to the right of the portal. Create a rectangle and place it over your portal row. Attach script-step to it of: Set Field [ gRelatedID ; originalPortal::RelatedID ]

Turn the rectangle transparent. When clicked, it will create the new relationship from gRelatedID to Related::RelatedID and the fields from the new table occurrence will fill in with that row's information. If Users can move forward/back through main records, you should modify your record-movement scripts to include clearing this gGlobalID field, using Set Field [ gRelatedID ; "" ]. If you don't, the next record will incorrectly still display the prior records' row data in the fields.

With vs. 7's new power, it's usually easier to open another window displaying the additional fields. You use the same process as outlined above, except instead of placing the fields directly on the layout, use something like:

Set Field [ gRelatedID ; originalPortal::RelatedID ]

New Window

Go to Related Record [ Show Only Related ; using layout containing the additional fields you wish to display ]

Much depends upon how crowded your main layout is; how comfortable you are with handling multiple-window issues and how your Main record movement is currently handled, ie, is Status Bar available, etc. Many ways to go with FM! smile.gif

LaRetta

Posted

Thanks so much to you both. The solution I read about (in "Advanced FMP 5.5"-which is apparently too advanced for me) is similar to LaRetta's, though I'm sure both would work. I'll see if I can get this to work. Jenny

Posted

That's neat. I use this the other way round generally. That is, the single row portal is a data-entry layout with a button which simply jumps to the last (empty) portal row to allow data entry and then as the data is entered a summary appears in the list. When I have completed the data entry the list allows me to view the details as requested here. I assume that the method you are describing still allows data entry by selecting the last empty row in the list portal.

Posted

I assume that the method you are describing still allows data entry by selecting the last empty row in the list portal.

Hi SlimJim,

The process I described doesn't change the functionality. However, I never allow creation by selecting last row because of creating blank records which must be deleted.

There are as many ways to handle portals and data-entry as one could imagine and each need should be considered independently. I usually move the User from the portal to another area (either to the right of the portal as described above or another window) to data-enter unless there are only a few fields that fit easily on one row (such as Activity or Notes entries) because a portal can still pop in 7; and validation, tabbing etc. are much easier outside of a portal.

LaRetta

Posted

LaRetta- I was able to set up the portal relationship and the related fields show the data, but I cannot figure out how to allow the user to enter new data. They can't use the portal because of the button, and can't enter it in the related fields because the relationship is based on an ID number in the portal. Any help is greatly appreciated. Thanks.

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