• Incorrret "active" tab in dashboard mode

    By T Theurer 2 decades ago

    When opening the db in the dashboard mode, the default view, defined in the database settings, is displayed, but the highlighted tab is from the last visit. I've changed the formula in the Frameset - Dashbord Views from:

    @GetProfileField("cfg_dbconfig"; "dbcfg_InitialView")

    to:

    tab := @Environment(@ReplicaID + "~tabselected");

    @If(tab ="1"; @GetProfileField("cfg_dbconfig"; "DashboardTabContentName_1");tab ="2"; @GetProfileField("cfg_dbconfig"; "DashboardTabContentName_2");tab ="3"; @GetProfileField("cfg_dbconfig"; "DashboardTabContentName_3");tab ="4"; @GetProfileField("cfg_dbconfig"; "DashboardTabContentName_4");@GetProfileField("cfg_dbconfig"; "dbcfg_InitialView"))



    Now the initial view is selected by the last environment setting.



    P.S.: A very good template

    • Already fixed in DEV

      By Kevin Pettitt 2 decades ago

      T, this is an odd one, as it occurs only intermittently for some people and sometimes only in specific applications based on SuperNTF. The "correct" functioning of the current formula depends on the database setting "restore as last viewed by the user", and this works in most cases. I have yet to see it fail in the more "traditional" frameset design.



      So as you've discovered it's simple enough to address the problem in the dashboard frame formula. The formula I've written is a bit more streamlined than yours but achieves the same result (and allows for additional tabs without recoding):



      defaultview := @GetProfileField("cfg_dbconfig"; "dbcfg_InitialView");

      currenttab := @Environment(@ReplicaID + "~tabselected");

      @If(currenttab = ""; @Return(defaultview); "");

      viewname := @GetProfileField("cfg_dbconfig"; "DashboardTabContentName" + currenttab);

      viewname



      I'll update the download shortly.



      Thanks for reminding me :-)



      Kevin