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 sinisa93
      Hi!
      I have two separate questions regarding portals and how they work. Before I start let me describe what I'm doing. I'm constructing DB for local karate club. I have one table/layout with general info about members, I have second table/layout with records about belts (including color of the belt, when & where the belt was obtained, the mentor of the member & sparing partners of the member etc.) and I have 3rd table/layout that shows various activities of each member (there are also several other tables but not important for this topic). All tables are connected via key field (ID number)
      QUESTION 1
      I have no problem creating portals on 3rd layout to show me which belts particular member has with all additional info from the second table that go along with it. BUT I don't know how to create a portal that shows all members of the club that had particular member as sparing partner. Thing is that I have 3 separate fields for sparing partner because each member can have up to 3 sparing partners and I simply don't know how to connect them all so I can see the list of all members that have particular member as one of three possible sparing partners.
      QUESTION 2
      I know how to place count of related records in filtered portal but I'm not sure how to get a Total of this counts.
      Any help is much appreciated!
       
    • By Volker Gurtler
      The database has table1 with “Sample No” field relating it to table2 with “Sample No” field. Table 2 has a portal on a layout with Table1. Each portal row has the Category field with one of 3 values (MF,BP and CC). There are about 7000 samples. Each sample has from 1-12 portal rows displayed with 1 or more occurrences of the 3 category values one of the values shows the count of each value per sample.
       
      The question is how do I write a script so that every sample has all 3 category values (MF,BP and CC)?
       
      I have the following scripts for when there is only one value/portal - one for each of the 3 values (3 scripts are the same except that “Molecular Function” is substituted for BP or CC and “Molecular Function” = MF):
       
      Perform Find [ Specified Find Requests: Find Records; Criteria: Transcript Database::Regulation: “=test” ] 
       
      [ Restore ] 
      Perform Script [ “Sort by Sample No” ] Go to Record/Request/Page 
      [ First ] 
      Loop
      Go to Portal Row 
      [ Select; First ]
      If [ GO_GOT::Putative Gene Function Category 
      "Molecular Function" ] 
      ≠ "Molecular Function" ] 
      ≠ If [ GO_GOT::Putative Gene Function Category 
      Go to Portal Row 
      [ Select; Next ] 
      Go to Portal Row 
      [ Select; Last ]
      Set Field [ GO_GOT::Putative Gene Function Category; "Molecular Function" ] 
      End If End If 
      Go to Record/Request/Page 
      [ Next; Exit after last ] 
      End Loop 
       
      I can not get a script to work on a portal with only 2 categories so that only one of the 3 categories is added per sample.
      Transcript Database v05 test.fmp12
    • By docasar
      Hello,
      I am newbie to filemaker pro but love it   Said so, I am struggling a solution that I am building for management of holiday apartments, based on FMSP. I have created a table for bookings, and apartments, and now I am working with another table call Daytariffs that would give the price for each day of the year for each apartment. So far I have being able to show the available apartments for a range of dates, but what I am struggling now is to show the prices for those days. Basically, what I have done on the DayTariffs table is to load 365 days (records) then I have created a field called "Range" and put a calculations that shows "YES" if a date is within the dates I have set on the Booking layout as StartDate and EndDate (this dates are global fields). I have created relationship between Daytariffs and Bookings through ID_DayTariffs (Daytariffs table) = id_daytariffs (Bookings table). Later,  I have also created a global field called "BookingDAYS" on Bookings tables and set the field value as "YES", and I have created a new relationship that relates BookingDAYS = Range.
      Then I have created a portal based on the the relationship between BookingDAYS=Range, on the Bookings Layout but wont show any records  I am stuck here because if I change the Range field to be just text without any calculation and I write "YES" then the portal works, but as soon as I put the calculation back, the related records disappear...
      I have checked that calculated result on Range field is set as Text as well as BookinDAYS is a text field... also what have noticed is that the relationship graph for BookingDAYS=Range has this simbol at both sides "|---" when normally would have a three lines (like a folk) when I choose any other filed for that realtionship instead of Range.
      I am attaching screenshots of relationship graph, booking layout and DayTariffs Table
      Any ideas what I am missing here?
      Thanks a lot.
      Luis



    • By Becca
      I'm very new to FileMaker design, so I may be missing something very basic, but I cannot figure out how to make this work.  I've got a working portal set up, showing the correct records.  I can add new records using the blank line in the portal, and those records then show in the portal window.  However, if I go look at the actual table that the portal links to, the new records are not being added there.  Are they going somewhere else instead? I need to actually create new records, not just display them!

    • By fyanesv
      Hi, I’m really Stuck , any suggestions would be most appreciated.
       
      Problem :
      I need to replicate a particular behavior of the PopOver that is inside a Portal.
       
      Behavior:
      When inserting or editing portal Rows via popOvers, the data updates in the portal before “committing”. 
       
      Solution:
      Trying to replicate this behavior according to this rules: 
      -. Using Transactions and Data modeling.
      .- Data not updated at the portal before committing (refreshing portal by trigger or exiting a field doesn't work).
      .- Data not updated at the portal as inserts or edits are been made (same as above). 
      .- Inserts or Edits are made outside the portal in the same layout (no modals, Using SlideControl).
      .- Not using PopOvers inside portal.
      .- Portal is not accesible by user it only shows the list of items been inserted or updated.
       
      I have tried different approaches but no solution yet, trying to replicate behavior has been very frustrating.
       
      Tried:
      Filtered Single Line portals and Magic Key with different Techniques and different relationship approaches, I have not tried Globals via Scripts which I presume could be a solution but don’t have much to start with!!!.
       
      For the record:
      A few months ago I started implementing “Selector Conector and Transactions”,  I´m not so sure I have correctly implemented this.
       
      I have prepared a Sample file (is not the actual solution) with very simple use of Transactions and Data Modeling, it shows different approaches I have tried. Used some technics learned here at this forum which have been very helpful.
       
      Approaches number 1 and number 2 from the Sample file are not the preferred, but merely show the behavior I´m trying to replicate.
      A script at start creates small window that shows records are been created in child's table even tough it won’t update the portal before commiting when using technics 3 and 4 from the Sample file.
       
      Hope my explanation makes any sense. 
       
      Thanks in advance, and cheers to all 
       
      PS.: Check the green Framed Portal at the right hand side of the layout´s Sample file for a cool technique that I designed, it uses  “Hide Object when”, and a combination of formatting the Button and portal row (Padding), which makes the illusion of an X circle appearing on the right side when Hovering portal rows, mostly used for deleting. Hope any one has a use for it.
      Sample.zip