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

Freeze the portal & Return to Same Spot?


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

Recommended Posts

Posted

Is there a way to freeze the portal so you can exit, do a script, and then return the same spot you were in previously?

I have scripted it so that I can leave the portal and then return to the previously selected record, but the record always shows up at the bottom of the list and the user has to reorient themselves to the data. Is there a better way?

Posted

While I might be missing some of the fine points in you description, but I think I know what you're after:

Set Variable [ $$theFieldname; Value:Get ( ActiveFieldName ) ] 

Set Variable [ $$thePortalRow; Value:Get ( PortalRowNumber ) ]

Set Variable [ $$whichLayout; Value:Get ( LayoutNumber ) ] 

.....

call script here

.....



Go to Layout [ $$whichLayout ] 

Go to Field [ PortalStuff::firstVisiblePortalField ] 

#To get into the right portal if more exists on the layout Go to Portal Row [ $$thePortalRow ] [ Select ] 

Loop 

      Go to Field [ PortalStuff::firstVisiblePortalField ] 

      #Why?? Go to Portalrow doesn't select a field! 

      Exit Loop If [ Get ( ActiveFieldName ) = $$theFieldName ] 

      Go to Next Field 

End Loop 

--sd

Posted

A while back I asked this same question on this board and the response I got was:

[color:blue]Before you move to a different layout, set a global number field with Get(PortalRowNumber).

When you return to the layout, Go to Field [portalRelationship::fieldInPortal] and then Go to Portal Row [by calculation: globalNumField].

This worked fine for me.

Posted

Let me clarify. I have three tables: Customer; Customer Items; and Items for Sale. I have a portal displaying a list of Items for Sale for a customer. I want the user to be able to scroll down the items and toggle a portal row ON/OFF. When toggled ON, the row is highlighted so the customer knows he/she has selected that item. The customer can then continue scrolling down the portal and select other items, toggling them ON/OFF as desired. Envision a portal with 20 rows.

My problem occurs when the customer selects an item that is say portal row 50 on a 20 line portal. If the customer scrolls down the list to portal row 50 and selects the toggle button, the record immediatley moves to the bottom row of the portal. This happens because I am exiting the portal and executing a script in another table and then returning to the portal.

The toggle is a radio button scripted to perform the following:

1) set a global to Get(PortalRowNumber) to remember the portal row

2) Exit the portal and create a new record in the Customer Items table.

3) Set a couple of fields in the Items for Sale table so that that selected line items will show up as highlighted on the portal.

4) Return to the Items for Sale portal shown in the Customer table

5) Return to the correct portal row in Items for Sale.

When the user selected the toggle button, they may have been mid-way down in the portal. After the script is performed, the item now shows up at the bottom of the portal. Note that if they select an item that shows up within the first 20 records of the portal, the script will return to the user to the correct position on the portal and will appear fine.

I found an earlier thread that solved this problem in FM5 (See "Fixed Portal" http://www.fmfiles.com/tnt5.html). I have not attempted this yet on FM8.

I have been using FM5 for several years and just recently upgraded from to FM8. Wow! FM8 is great! I'm still getting to know the product and hoping there a better way in handle the "fixed portal" in FM8.

Thank you for any help you can offer.

Posted

First, make sure your layout (the one with the portal) is set NOT to 'Show field frames when record is active' in Layout Setup.

Next, before you move to another layout, do this script step:

New Window [Height: 1 ; Width: 1]

Do your set fields stuff in the other table/s, then:

Close Window [Current Window]

Posted

It works! Thankyou for the tip!

For anyone else using this, you will not be able to use a "Go To Related" script after executing the New Window script because you lose the relationship link to the portal you are working in. Instead, I had to go the child database and execute a find script for the related record. Works great. Thanks again!

Posted

you will not be able to use a "Go To Related" script after executing the New Window script because you lose the relationship link to the portal you are working in.

But you can make the "Go To Related Record" step itself open a new window.

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