Announcement

Collapse
No announcement yet.

How to dynamically change the default app of a menu?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to dynamically change the default app of a menu?

    Based on the value of certain global variables, I would like to change the default application of a menu.

    Here are my questions if you can answer any of them I appreciate it:

    Q1 - I use the settings to change the default application in a static menu. Anyway to change that as menu initializes?
    Q2 - any way to change default menu app later by script or macro?

    Q3 - I see how to make a dynamic menu using tables, but how to you set the default on those dynamic menus?

    Q4 - as a fall back, can I set default app to a blank app, then use event to test and use sc_redir macro to change to the proper app?

  • #2
    Re: How to dynamically change the default app of a menu?

    Hurray! I was able to put a global variable into the default app setting field, instead of just an app name. Now I can change that by my scripts. SC thinks of everything....although I swear I could not find that on any sample, help file, or forum post....

    Peace,
    Jamie

    Comment


    • #3
      Originally posted by onmountain View Post
      Hurray! I was able to put a global variable into the default app setting field, instead of just an app name. Now I can change that by my scripts. SC thinks of everything....although I swear I could not find that on any sample, help file, or forum post....

      Peace,
      Jamie
      Can you explain more detail about how you did this?

      Comment


      • #4
        Yes please share!!!!!

        Comment


        • #5
          I expect you can enter a global variable as the default name like [my_startapplication] ?
          To use it you must have set it properly before this action is executed: in another application or in the onscriptinit.
          Albert Drent
          aducom software netherlands
          scriptcase partner, reseller, support and (turn-key) development
          www.scriptcase.eu / www.scriptcase.nl

          Comment


          • #6
            Yes, that's what I was looking for. I've tested aducom's solution and it works perfectly.

            In menu_app I set a global variable as the default app name, example: [default_app]

            When I log in, I send one value [default_app]='form_one_app', and if I need to change the menu default application, for exampe using sc_redir macro, I do it like this:

            Code:
            sc_redir(menu_app.php,default_app='form_another_app,"_top");

            Comment


            • #7
              Interesting!

              Comment

              Working...
              X