AnsweredAssumed Answered

Sort Issue Moving Between Tabs

Question asked by jdhelle on Aug 2, 2013
Latest reply on Aug 4, 2013 by philmodjunk

Title

Sort Issue Moving Between Tabs

Post

     I have a layout with multiple tabs and each tab has a unique name.  Let's say I'm on the 'DD Tab' and I select my 'Next' button 3, 4, 5 times etc.; the 3rd, 4th, or 5th record displays and everything is fine.  

     Wnen I switch to a different tab, say the 'BA Tab', I have a script trigger that 'On TabSwitch' it performs 'Determine Tab'.  'Determine Tab' finds what tab you have switched to, in this case 'BA Tab', and performs the 'Blue Amberol Script'.  

     However, when the 'BA Tab' displays, it begins on the 3rd, 4th, or 5th, not the first.  When I view the found data in a table there are only Blue Amberol records and they are sorted correctly. 

     I have proven that the 'Determine Tab'  is finding the correct $$TabName using the Speak command.  I have also proven that the correct Find and Sort Script, in this case the 'Blue Amberol Script' is running by again using Speak.  

     Any idea why it display starts at the 3rd record instead of the 1st on the new found set?  

     What's even more odd if after it's displaying the 'BA Tab' with the 3rd record if I run the 'Blue Amberol Script' manually, it then displays the first record.

      

     Here are the scripts:

Determine Tab

     Set Variable [$$TabPanel; Value:Get(TriggerTargetTabPanel)]

     Set Variable [$$TabName; Value:GetValue($$TabPanel; 2)]

     If [$$TabName = "DD Tab"]

          Perform Script ["Diamond Disc"]

     Else If [$$TabName = "BA Tab"]

          Perform Script ["Blue Amberol"]

     (and it continues to check all the other tab name possibilities)

     Else

          Show Custom Dialog ["Error"; "Determine Tab - No Tab Found"]

     End If

      

Find and Sort Scripts

Diamond Disc Script

     Go to Layout ["Record Detail Tabs" (Owned_Music_Library)]

     Go to Object [Object name: "DD Tab"]

     Enter Find Mode []

     Perform Find [Restore]    ------  Find Records = Owned_Music_Library::Medium: [Diamond Disc]

     Sort Records [Restore; No dialog]   -----  Sorting on Medium and Coupling Number

     Go to Record/Request/Page [First]

      

Blue Amberol Script

     Go to Layout ["Record Detail Tabs" (Owned_Music_Library)]

     Go to Object [Object name: "BA Tab"]

     Enter Find Mode []

     Perform Find [Restore]    ------  Find Records = Owned_Music_Library::Medium: [Blue Amberol]

     Sort Records [Restore; No dialog]   -----  Sorting on Medium and Cylinder Number

     Go to Record/Request/Page [First]

      

Outcomes