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 Portal- Problem
      By dav1089
      Hi,
      I have Contacts portal on Company layout. Now, I can do FIND in other fields of the portal but email field., I already checked inspector > Field Entry in find mode is cheked..
      I have attached screenshots 
       


    • Finding highest value Date field record from Portal
      By dav1089
      Hello,
      Issue:
      I have Sales Activities Portal on each company's record, now I want to list all first rows of portals from each company record on another layout. Now, I also want only those rows with non-empty follow-up date fields too. My Portal is sorted by Activity Date in descending order. 
      What I have done:
      I have onlayoutenter script as below:
      Enter Find Mode Set Field[Daily Log::date_followup; "*"] Set Field[Daily Log::date_activity; Max(Daily Log::date_activity)] Perform Find[] It is fetching all records from each Portal which has non-empty follow-up date value
       
      I want only highest activity date value row from each portal 
    • Empty Portal Row
      By samarthmkt
      Hello friend,
      How we can Restrict for not showing last empty portal row in portal table.
    • Popover from Portal showing the wrong record
      By Brad Mathews
      I think I have a relationship problem here even though the problem appears to be with the Portal or Popover.
      As you can see from Screenshot1, the popover is showing the data for the wrong record. Interestingly, clicking the Go to Full Record button which calls Go To Related Record does go to the correct record as indicated in the Portal.
      This is also happening with the Siblings Portal, see Screenshot2. However, the Go to Full Record button on siblings portal behaving differently - it is going to the record showing in the popover which is the same record being display. So it goes nowhere of course.
      The Relations screenshot shows the relevant relationships as well as the more complicated one I am using to get the siblings.
      On the Parents layout I am doing the same thing - showing Students via the Parents_Students and Related Parents and the popovers are working fine.
      Let me know if you need more data.
      - Brad



    • Filter to exclude matching records
      By sal88
      Hi all
      I have a personnel portal (looks up values from the 'personnel table'). When I click a row then the associated personnel_ID is put in to a personnel_IDF field in a new record of a different table (Case_personnel). This second table is also displayed in a portal.
      No changes have been made to the 'personnel' table.
      How can I get the personnel portal to exclude records where the personnel_ID matches the personnel_IDF field in the Cases_personnel table?