Announcement

Collapse
No announcement yet.

Menu application - default initial application

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

  • Menu application - default initial application

    Does anyone know how to set a dynamic initial application in menu? for example, user1 logs in and see initial application A and user2 logs in and see initial application B.

    Thank you.

  • #2
    Just use a blank application and do your filter there:
    if user1 then sc_redir application 1
    if user 2 then sc_redir application 2

    In your menu you set the blank application as default. When that loads the execute will fire and your needed application will start.
    Albert Drent
    aducom software netherlands
    scriptcase partner, reseller, support and (turn-key) development
    www.scriptcase.eu / www.scriptcase.nl

    Comment


    • #3
      Thank you for the suggestion, Albert. It works perfectly!

      Comment


      • #4
        I use groups for my security so doing individual users would be extremely difficult, but I have found a way of using the groups to show specific calendars for specific groups.
        Doesnt take much just on the onload even of the menu set the application you want for the groups with a variable.
        Then assign that variable to the default application in the menu settings area.
        for example:
        in the default application i put this variable:
        $security_menu
        I define that variable by coding in the OnLoad event of the menu:

        /**
        * Check role for calendar to show
        */

        // Check for record
        $check_sql = "SELECT login"
        . " FROM imsi_employee_sec_users_groups"
        . " WHERE login = '" . [usr_login] . "'"
        . " and group_id = '2'";

        sc_lookup(rs, $check_sql);

        if (isset({rs[0][0]})) // Row found
        {
        $security_menu = 'Gen_Cal_Data';

        }
        else // No row found
        {
        $security_menu = 'Gen_Cal_Data_LOA';


        }

        This way if an HR peron logs in they see the Gen_Cal_Data Calendar
        if they arent a HR person they see the Gen_cal_Data_LOA calendar..


        Hope this helps...

        Kevin

        Comment


        • #5
          You can also use switch case statement for a common variable for displaying different initial applications for different users. This will allow future prospects of allowing more departments to be created in the project.

          Comment


          • #6
            Very handy post gentlemen. Keep up the good work! We (I) need it!

            Comment

            Working...
            X