Jump to content

Go to portal row from another portal on same layout


biztrac
 Share

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

Recommended Posts

  • Newbies

I have a Companies table layout that has a portal for Contacts. This portal only shows one contact at a time with the scroll bar activated to enable scrolling to more contacts. A second portal on this layout lists the last names of the contacts that are entered in the Contacts portal.

I want to be able to click the last name of the contact in the 2nd portal and have it display the correct contact information in the Contacts portal.

Previous methods for going to a specific portal row from another portal on the same layout no longer work in FM8. I am referring to having a unique field in the first portal and using the Go to Field script step to get from the second portal to the first portal.

Any assistance would be greatly appreciated.

George

Edited by Guest
Link to comment
Share on other sites

  • Newbies

Either the problem I posed is so elemental that no one thought it was worth answering or no one could come up with a satisfactory solution.

In either case, I have good news. I solved the problem. I decided to post the solution in the hopes of helping others.

The key to the solution is to recognized that the script step "Go to Portal Row" is designed to be used from within a portal. All attempts to use this script without first scripting oneself into the target portal will be unsuccessful. Once I realized that, everything was simple.

First find a way to set a global to the Portal Row Number you want to go to. It must be a specification of a row number (not a Contact ID, etc.) In my situation, this was easy since the second portal had the same Portal Row Numbers as my first portal.

Then set a Go to Field script step to any field in the first portal that is not displayed in the second portal.

Then set the Go to Portal Row (by calculation) to be the value set in gNumber. This brings you to the correct portal row and in my case, displayed the Contact info in portal 1 (set to display only one record) that corresponded to the last name I click in portal 2. At this point, adding another Go to Field step will take you to any field in the desired portal row.

This solution immediately allowed me to solve another portal problem where I was trying to return to the correct portal row after copying Address information into one or more Contacts.

One final note. In my original posted I stated that:

"Previous methods for going to a specific portal row from another portal on the same layout no longer work in FM8. I am referring to having a unique field in the first portal and using the Go to Field script step to get from the second portal to the first portal."

I know see that this is statement was incomplete. The Go to Field step is crucial to successfully going to the correct portal row. I should have said that in FileMaker 6, that was the only step that was needed to go to the correct portal row. What was missing was that the Go to Portal Row step must follow the Go to Field step.

I hope this information will be beneficial to others.

George

Link to comment
Share on other sites

"Go to Portal Row" is designed to be used from within a portal. All attempts to use this script without first scripting oneself into the target portal will be unsuccessful.

In my huble opinion has it ever since the introduction of portals in 1995 been so, if more that one portal exists on a layout, so Yes it's pretty basic, and I would have answered this right away if I had paid attention to this thread before.

--sd

Link to comment
Share on other sites

The stacking order (of two indentical-TO portals) will determine which FM will jump to first. So the FIRST to be placed on the layout will be default. I have used that successfully for various jumps. It works in vs. 7. I haven't used it in vs. 8 but if IIRC, I DID run a few tests and it held true. This trick came from Ray over a year ago.

Link to comment
Share on other sites

Interresting, but it escapes me where you're bound to utilize such knowledge, remembering once...

...when I was assigned to make Pupitas eoffice into danish. What he did was to make a stack of the same field but attached different valuelists to each occurence, he figured out how many times to issue a Go to next field in the taborder by getting it's position in ValueListItems( Unfortunately can't you expect that words in a different language sorts similarly.

You can guess or imagine the jumping beens debugging it took to get the jumping getting right valuelist/field occurence.

So back to the portal issue, wouldn't it be better to make a tiny 1 pix field uniquely in one portal, and another unique in the other so they differ ever so slightly, instead of trying to keep track of the reshufling done with similar layout elements. I smell a great timewaster here!

--sd

Link to comment
Share on other sites

That makes perfect sense, Soren, thank you. Disallow Entry and colorize text to portal background. And what if a portal wonks and needs to be replaced? That would reverse the stacking order (when pasting a new one) unless one remembered. Then it would all break.

I STILL have a few stacked value lists (one for Management and one for everyone else). :wink2:

LaRetta

Link to comment
Share on other sites

Either the problem I posed is so elemental that no one thought it was worth answering or no one could come up with a satisfactory solution.

Or perhaps the description of the problem was not clear enough...

In any case this statement:

the script step "Go to Portal Row" is designed to be used from within a portal

is not entirely correct. Just to clarify further what LaRetta said:

If you ARE in a portal, Go to Portal Row goes to the specified row in the active portal;

If you are NOT in any portal, Go to Portal Row goes to the specified row in the portal that is arranged farthest to the back on the current layout.

Link to comment
Share on other sites

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