AnsweredAssumed Answered

Getting Portal to Auto-Select Correct Row

Question asked by AdamQuintero on Apr 18, 2014
Latest reply on Apr 21, 2014 by philmodjunk

Title

Getting Portal to Auto-Select Correct Row

Post

     I have the primary key for a portal table and it's layout parent table stored in global variables $$parentKey and $$portalKey

     The two tables are related, and the portal is filtered as:

     PatternCount(PortalTable::parentKey ; $$parentKey) > 0

     I want to script the OnLayoutEnter trigger such that the highlighted portal row is automatically aligned with the value of $$portalKey.

     My script goes like this:

     Go to Object["portal"]

     Go to Portal Row[Select;First]

     Loop

          If[PortalTable::portalKey ~= $$portalKey]

               Go to Portal Row[Select; Next; Exit after last]

          Else

               Exit Loop If PortalTable::portalKey = $$portalKey]

               Go to Portal Row[Select; Next; Exit after last]

          End If

     End Loop

     What I am getting is the last row of the portal is always highlighted, and it does not highlight the row with value $$portalKey for field PortalTable::portalKey.

     I hope I explained this properly, I am thinking perhaps there may be something wrong with the script's loop?

      

Outcomes