0

openTable issue

Hello -

openTable script stopped functioning.

Starting with 3.15 I have button scripts that direct the user to a table and view

openTable("Supplier", "Inventory")  .... has been working for months.

When the button is clicked the Supplier table is brought into view but not the Inventory tab.  It defaults to the first tab in the table rather that the one in the script.

Any ideas?

18 replies

null
    • francescostefanello
    • 2 wk ago
    • Reported - view

    It is possible that Ninox has updated the behavior of functions or the methods of accessing data, causing incompatibilities with scripts. I wonder if a fix for this, which seems to be a bug, is on the agenda.

    • Fred
    • 2 wk ago
    • Reported - view

    I'm not able to reproduce it in public cloud 3.15.

      • spinner_7580
      • 2 wk ago
      • Reported - view

       

       

      Maybe I tricked myself regarding the opeTable command.  I actually have 2 commands in the button script (sorry for the confusion in my original post):

      openTable("Supplier", "Inventory");

      openRecord(first(select Supplier),"Inventory")

      I can confirm that in Mac app 3.14.3 the above script will leave the LaunchPad table and switch to the Supplier table and display the 3rd tab in the Supplier table. -- this is the desired behavior.

      However, if the script is simply:

      openTable("Supplier", "Inventory")

      In Mac app 3.14.3 the script will leave the LaunchPad table and switch to the Supplier table but display the first tab - ignoring the tab parameter "Inventory"

       

      When I was messing the the database on the clients public cloud 3.15 I could copy and paste a "fresh" version of the first script above and the behavior would "work" the first time, i.e, Leave LaunchPad table and land in Supplier table tab 3 (Inventory) but, subsequent "button clicks" would yield the behavior of leaving the LaunchPad table and landing in Supplier table tab 1.

       

      Scripts that switch between tabs of the same table work using the openRecord command.

       

      I guess the openTable command never really "worked" in that it simply switches to the named table and lands on the first view, whatever it is, and ignores the named view parameter.

      Apparently, since I paired it with the openRecord command I got the result I wanted.

      So, again in Mac app 3.14.3

      By itself, openTable("Supplier", "Inventory") only switches from the LaunchPad table to the Supplier table but ignores the tab parameter and instead lands on tab 1

      By itself, openRecord(first(select Supplier),"Inventory") switches from the LaunchPad table to the Supplier table and lands on the Inventory tab (tab 3)

      • Fred
      • 2 wk ago
      • Reported - view

      I just tried on Mac app v3.14.3 and was not able to duplicate. I have a button with just openTable(). I tried it using a Public Cloud DB and a local DB and both instances the button took me to the table and view. My view is a table view.

      What kind of view is Inventory?

      Can you upload a copy of the DB with just one record?

      • spinner_7580
      • 2 wk ago
      • Reported - view

       

      Hi Fred -

      The LaunchPad where the button is located is a form view.  The LaunchPad associated table just has one record.

      The Supplier table has many records and has one form view with 3 tabs.  The button used to land on the form view tab 3 (Inventory) now it lands on tab 1.

      As mentioned, I can get the public cloud 3.15 version button to work once after "refreshing" the script.

       

      Uploading the DB would be problematic since there are lots of references in field names and the like that are proprietary.

      I might be convinced to DM to you at the great risk of you laughing me for what is likely crummy programming compared to the likes of your gteat expertise!

      • Fred
      • 2 wk ago
      • Reported - view

      I've tried it with a form view and still no issues, in public cloud.

    • Fred
    • 2 wk ago
    • Reported - view

    Try this DB out.

    Open the Dashboard table

    You will see a choice field called 'Select a View'. So select a view.

    Then click on Open Table and View.

    Let me know what happens on your end.

      • spinner_7580
      • 2 wk ago
      • Reported - view

       

      Thanks!  Tried out your DB and it performed as I think you expected.

      I attached your DB with a slight change.  I added a Tab to TableA Form.  The first Tab in Form I guess defaults to TableA.  I added a Tab called "Extra Tab" just before the Yes/No field in the Form field list.  I then added "Extra Tab" to the Select View choice field.  Then when I click button 'Open Table and View' I get the behavior I am seeing.

      It switches to TableA and lands on TableA tab and not on Extra Tab.

      Sure appreciate you playing along with me!!

    • spinner_7580
    • 2 wk ago
    • Reported - view

    I should have included this in the DB but, if I make a button with this script in the Dashboard table:

    openRecord(first(select TableA), "Extra Tab")

    I get the behavior I'm looking for - it lands on Extra Tab.  This works in Mac app v3.14.3 but not in public cloud...

      • Fred
      • 2 wk ago
      • Reported - view

      Well it works for me in public cloud. I used the code you provided and it always goes to the correct tab.

      • spinner_7580
      • 2 wk ago
      • Reported - view

       

      Just so I'm clear on what I see...

      Attached opentable - mod-1 at Dashboard table 'Select a View' is 'Form'

      Click Open Table and View { script openTable("TableA", text('Select a View')) } results in switch to
      TableA, Form view and Tab TableA selected:

      Go back to Dashboard and 'Select a View' set to 'Extra Tab' click Open Table and View results in
      switch to TableA, Form view and Tab TableA selected instead of 'Extra Tab':

      Go back to Dashboard with 'Select a View' set to 'Extra Tab' & clicking on the XTRA Button with the
      script openRecord(first(select TableA), "Extra Tab") I get the following desired result:

      Mac app 3.14.3

       

      Even more strange, with 'Select a View' set to 'Extra Tab' use the Home button to go back to the local databases workspace, click on open tab - mod-1, select Dashboard, click on the Open Table and View button and get this result:

    • Fred
    • 2 wk ago
    • Reported - view
     said:
    Go back to Dashboard and 'Select a View' set to 'Extra Tab' click Open Table and View results in switch to TableA, Form view and Tab TableA selected instead of 'Extra Tab':

     openTable() can not open a tab in a record. Which is where 'Extra Tab' exists. That is why openRecord() can open the 'Extra Tab' because you are in a record.

    Even more strange, with 'Select a View' set to 'Extra Tab' use the Home button to go back to the local databases workspace, click on open tab - mod-1, select Dashboard, click on the Open Table and View button and get this result:

    That is not strange. Ninox doesn't know what view to open since Extra Tab is not a view at the table level so it will default to the first tab.

    • szormpas
    • 2 wk ago
    • Reported - view

    Hi, also in my Database the popupRecord(myRecord, tabName)  stopped functioning properly after upgrading to 3.15 (the function opens the myRecord but lands to first tab instead of the given tabName)

      • Fred
      • 2 wk ago
      • Reported - view

      I can confirm that popupRecord() does not open the correct tab.

      • szormpas
      • 2 wk ago
      • Reported - view

        Hi, I hope that Ninox will address this issue as soon as possible

      • Rafael Sanchis
      • Rafael_Sanchis
      • 2 wk ago
      • Reported - view

       

      openRecord(this, "Charts Info") I use this to go to specific tab and works.

      • szormpas
      • 2 wk ago
      • Reported - view

       Hi, instead for openRecord(this, "Charts Info") , can you try popupRecord(this, "Charts Info");

      • Rafael Sanchis
      • Rafael_Sanchis
      • 2 wk ago
      • Reported - view

      No the popupRecord don't work