ron G

After portal row 'click' focus goes to top

8 posts in this topic

I have a portal that has about 100 'names' in it. This list is longer than the portal is 'tall' so the user must scroll down to find a name. After the user scolls down to find 'Smith' and clicks it, the portal 'scroll elevator' jumps back to the top.

I would like the portal 'elevator' to stay showing 'Smith'

I have set "Reset scroll bar when exiting porgram" OFF but it doesn't help.

Thanks for your thoughts.

Ron

Share this post


Link to post
Share on other sites

Use/amend the script on your portal button that includes

Set Variable [ $row ; Get ( ActivePortalRowNumber ) ]

Go To Related Record [ portal_relationship ; use the current layout ]

Go To Portal Row [ Select ; First ]

Go to Portal Row [ by calculation $row ; no dialog ]

Leave checkboxes unticked on show only related and matching found set

Be aware that this only works when there is just one portal on the layout

Share this post


Link to post
Share on other sites

You say your 'fix' "...only works when there is just one portal on the layout." Rats! I have a cartesian join from one portal and a related portal on the same layout.

I added the script above but even though debug showed it working... it did not. I suppose it is because of the additional portal on the layout?

This begs another question: "What does the portal setup option "Reset Scroll Bar When Exiting" do? I have checked and unchecked it with apparent affect.

Share this post


Link to post
Share on other sites

the portal 'scroll elevator' jumps back to the top.

Just to be sure we are on same page, you mean that the portal jumps back to the first portal record when you leave the portal?

I have a cartesian join from one portal and a related portal on the same layout.

Normally it should work, Ron. Do you have field triggers on the layout anywhere or triggers at the layout level? Also, what are the tabs doing? If next in tab order is first field in the portal then it might be returning 'home.'

Just some things to check. We might need to see the file to fully understand what is happening :^)

Update: I removed the comment about the Cartesian product join. I had Cartesians on the brain and meant that reset scroll isn't available if vertical scroll is removed.

Edited by LaRetta

Share this post


Link to post
Share on other sites

If you are not in tabs, and you have two portals to the same table, then Go To Portal [] depends upon stacking order. You can issue it again to move to the other portal but it will break if you ever change the stacking order of the portals or add another portal. Try using Go To Object [ portal ] before the first Go To Portal to force it to stay with the portal you wish, first.

But none of this should be necessary with a simple setup so I think there are other things happening here ...

Share this post


Link to post
Share on other sites

LaRetta,

hmmm. I just 'restacked' the portal (It is in the 'front'). Same result.

Maybe I should explain the 'setup'

I have a layout based on the Members Table: name, address etc...

I have a TO called MemberList based on Members. My portal is based on MembersList X with Members.

The portal just has the Members Name. (David Crockett in the example is highlighted) When clicked, the portal does a GTRR and the Members full record comes up.

This all works well.

The problem is the portal shows 31 records. If I scroll down to a last name of Zinker and click, his whole records shows in Members (as it should) but then the scroll bar zooms to the top of the portal. Zinker is still highlighted in the portal but I can't see it because the(^*&%$@ scroll bar has brought up the 1st 31 records.....

post-72145-0-91827900-1331262146_thumb.j

This all seems pretty straight forward so I can't imagine 'what else might be in going on'.

Thanks for your thoughts.

Ron

Share this post


Link to post
Share on other sites

If you are not in tabs, and you have two portals to the same table, then Go To Portal [] depends upon stacking order. You can issue it again to move to the other portal but it will break if you ever change the stacking order of the portals or add another portal. Try using Go To Object [ portal ] before the first Go To Portal to force it to stay with the portal you wish, first.

But none of this should be necessary with a simple setup so I think there are other things happening here ...

YES! I just used your idea of go to OBJECT Prior to the Goto Portal Row [first] and it worked. I am pleased but amazed. I had brought the portal to the 'front' of the stacking order but it didn't make a differrence. Apparently I needed to be specific in which object (portal) I was specifying. And, when failing to do that my script issued a 'refresh' which brought the scroll bar back to the top. (at least that's my theory).

Thank you LaRetta!

Share this post


Link to post
Share on other sites

1). Give name to portal (say Portal1)

2). Set variable $$row - Get(ActivePortalRowNumber)

3). Set variable $$object - Portal1

3). Go to related record (Any layout)

 

When returning to original layout:

1). Go to object : $$object

2). Go to portal row : $$row

 

Try it.. It worked for me...!!

Share this post


Link to post
Share on other sites

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

  • Similar Content

    • By Guy_Smith
      I can't figure out how to subtract the total of several child records from a starting value in a parent record:  Sounds simple, but it's got me stumped!
      My database is designed to issue Emissions Reduction Credits to companies for reducing or eliminating sources of air pollution.  Those companies then later use those credits to offset new construction, sell them to other companies for cold, hard cash, transfer them to other companies, etc.  The initial issuance is all on one Certificate and there can be between one and five pollutant credits on each individual Certificate.  A company can own many certificates, but a certificate can only belong to one company.  Once issued, a company can use the credits all at once or (more likely) a little at a time.  After each use/expenditure of credits, the certificate is reissued with the new balance of credits listed on it.  Thanks to a lot of great help in the Relationship subforum (Thanks again, Don and Bruce!), I've got the basic architecture down and issuing the initial credits works just like it should and the FIRST instance of credit usage calculates the new balance correctly, but when subsequent uses/expenditures are entered, the new balance ignores any previous expenditures.
      I've tried dozens of different calculations, added TOs, lumped all transactions into one TO, filtered portals, and barked at the moon, and nothing works (though I did manage to scare the bejeezes out of my cat!)
      I have attached my semi-sorta-solution to help clarify my problem.  It should open to the "Certificate" layout - the bottom portal has the usage data that isn't calculating the new balances correctly.  Any help in getting this up and running would be most appreciated - thanks in advance for sharing your time and talents.
       
      Best Regards,
      Guy
      FMPA 15, Windows and Mac
      ERC Registry v2 ModBFR Bad ERC Balance.fmp12
    • By Roger Tuan
      Is it possible to sync data in a Filemaker portal to an external MySQL database? For example, an invoice listing multiple products stored in another table (assuming I only want the information in the portal, such as qty, name, price).
      Or do we have to manually sync all related tables behind the scenes and then re-create the relationships using joins later?
      Thank you!
    • By Scott Pon
      Environment: FM13 with FM13 Server, mix of Windows 7 and 10.
      Is there a way to set a script trigger on if this portal row is new? IE, a script to run if this new child/portal record is new.  
      We have a parent record, and portal to Children records.  The children records have 2 fields: Profile Name and Process type.  Our user would like to enter a new child record (profile name and process type).  if the process type already exists, we will need to archive the existing record (matching the profile type).  There is more bI want to start with this first.
      I see script triggers to the layout "OnRecordCommit", but no similar script trigger for portals.  Any ideas on how to handle this?  Or am I going to have to add a button to go to another screen to accomplish this?
      Thanks.  I hope i gave enough info for you to help me.
       
    • By Sergej Ivanov
      Hi, I got stuck with building a proper relationship scheme.
      I'm making an database with several tables. One table contains information on archaeological features (key field Feature ID), another contains data on documentation. One document may contain information on several features, for this reason in documentation table I've created several fields (Feature ID 1, Feature ID 2, etc). The two tables are related through Feature ID=Feature ID 1; in the second table I've made a self-relation between all Feature ID fields.
      In the Features layout I've made a portal displaying related records from Documentation table. Unfortunately it only displays related to the first field (Feature ID 1), while other fields (Feature ID 2, etc) seem remain unrelated. 
      What do I do wrong? Thank you!
    • By atlanticind
      Im currently using a portal to relay certain information from my main database, the information that is related between the two are the fields of 'Brand' and 'Part Number'.
       
      The only other fields i have in my portal will be
       
      1. Sale Or Purchase (a drop down list to select either sale or purchase).
      2. Quantity
      3. Date
      4. Price
      Is there any kind of calculation so that when i select either the 'sale' or 'purchase' option in the drop down list that it will either add or subtract the quantity i then enter into my quantity field, this way my stock list can keep up to date with the correct quantities?
       
      Example
      Brand - ddd
      Part No. - 123
      Sale selected
      Quantity - 3
      Date - 22/02/2013
       
      so after i have entered all of this data because i have sold 3 i need my calculation to take 3 away from the overall stock, and for the calculation to add 3 if this was a purchase
       
      hope this makes sense
       
      thank you