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

    • Find in progress. Processing query... - going slow for only ONE portal
      By jraquel
      Hi,
      New to this so not sure what is needed to help me. I have several portals in my database and they all have filter and sort settings. All the settings are the same on each portal (just pulling from different layouts). Each portal has a button with a script in it that has it "go to the related record." All of my portals and go to related things work great and quick an no issues.
      Yesterday, I added a new portal and a new go to related and updated my relationships, etc. everything mimics the same settings on all my other portals. BUT for some reason this one portal and go to related are lagging big time and everytime I do anything that affects that portal I get the "find in progress. processing query..." and it takes several minutes to process.
      I do not get this my other portals and I'm a bit confused and feeling frustrated that I'm having trouble with JUST the one portal. HELP! What do you all need from me to help me with this? 
    • Portals content in email as table
      By Christopher Michael Binks
      Hi I'm pretty novice at FileMaker but have as solution pretty much operational internally.  
      My company is all based on running bookings with external clients and provider all through email. 
      Currently it's all done manually the admin assistant copies the booking from the booking sheet to a email templat in a table and then sends this out one table to the client, another to the provider of which there can be many.  
      The bookings are trotted up in a portal on the clients page with a new line for each product.  Can I export the portal to a html table to email out generating a new table row for each matching portal row?
      I presume I'm not the only one generating lists of items for email but can't get a handle on how to achieve this without a fixed table and substitution line by line have looked through all the documentation I can find  
      Assistance greatly appreciated
       
    • Conditional Value List in Portal with multiple field values
      By dav1089
      Hello,
      I am trying to create a daily sales call log, for that I have used Portal for which I am using "company" table in which I have "contact 1" to "contact 12" separate fields for each record (company)
      Now, on the portal, I was able to fetch contact names dynamically based on chosen company using conditional value list relationship and creating new text field with auto-enter calculation of List(contact1,....,contact12), but how can I fetch contact number for selected contact name for that company? I created a new field to auto-enter calculation of contact numbers like the same way but it seems like I am going in wrong direction
      It would be great if anyone can tell me as I am learning FM.
      Or is there any other way of doing the same?
      Here is my relationship diagram and layout:


    • Crashing with filter formula
      By sal88
      Hi all
      Since upgrading to FM14 we've experienced crashing (errors 1000 and 1026 in the error log). I thought perhaps it was to do with version 14 or .net or my scriptmaster plugin.
      However it appears to be to do with a filter that I had in place for a portal. It was probably just a coincidence that I had so many records that it was referring to by the time I did the FM14 upgrade.
      I can probably do without the portal altogether really, but was just curious as to what the problem might have been.
      The filter formula was: Cases Closed::Closed_TimeStamp > (Get(CurrentDate) - 30)
      The Cases Closed table has around 22,000 records.
      Any ideas what's wrong with this?
      Thanks
    • Portal exported to excel spreadsheet only contains one related field once, other fields are empty
      By justakid
      Hi All,
      Sorry if the title is a bit confusing, I wasn't sure how to explain it.
      Basically I've got a layout that contains a portal to another table. abc0198_cpa_v002 and xyz0570_cpa_v0008 are the link to the other table (linked to the table by the first 6 characters)

      the problem I have is when I export this I get the following in Excel. I was hoping that the empty fields beneath abc0198_cpa_v002 would be filled with abc0198_cpa_v002.

      I can get it to work by going to the related table, searching for those records (abc0198 & xyz0570), but I will fall into the same problem when I receive multiple records that relate to the same record in the other table. IE I might receive abc0198_cpa_v002 and abc0198_cpa_v005 etc.
      I hope this makes sense and thanks in advance for any help.