Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
maintenance menu with several lists for drop down menus
-
- Posts: 30
- Joined: Wed Sep 06, 2023 12:45 am
maintenance menu with several lists for drop down menus
In the past I've created a maintenance menu that only admins can use. It's a simple form with several other forms on it to maintain the lists for drop down menus. In case I'm using the wrong term I believe these are select fields in nubuilder. So I suppose technically they are not subforms in the nubuilder sense of the term. For example a select field 'team' would look up the list provided in the maintenance menu for the possible options for the team field. What would be the best was to handle this? I've created forms with buttons that pop up forms to get around a subform of a subform restriction. I suppose I could create a form with multiple buttons on it that each pop up an unrelated form. Is there a better route?
-
- Posts: 115
- Joined: Tue Dec 12, 2017 11:28 pm
- Location: Aberdeen, UK
- Has thanked: 9 times
- Been thanked: 12 times
Re: maintenance menu with several lists for drop down menus
databs1234,
There are many ways to do this - here is one.
This approach assumes that you have two access levels defined in sys_zzzzsys_access, something like 'admin_level' and 'user_level'.
1. Create a new launch form for all of your 'admin objects' and move the existing ones to that form. This form should be accessible only to 'admin_level' users (set using the Access Level tab on the form properties). The admin form can have buttons with links to Browse/Edit forms that contain the lookup lists for SELECT boxes etc., as you describe.
2. Create a new button on the application landing form - this assumes that all users see the same landing form after a successful login. Let's call it 'btnAdmin'. This button will open the admin form described in step 1.
3. Modify the landing form JS to include:
This will remove the button for all access levels other than 'admin_level', so that only admin users will see this button and be able to open the form for the admin functions.
As I said, there are many ways to do this but this is a simple one.
Neil
There are many ways to do this - here is one.
This approach assumes that you have two access levels defined in sys_zzzzsys_access, something like 'admin_level' and 'user_level'.
1. Create a new launch form for all of your 'admin objects' and move the existing ones to that form. This form should be accessible only to 'admin_level' users (set using the Access Level tab on the form properties). The admin form can have buttons with links to Browse/Edit forms that contain the lookup lists for SELECT boxes etc., as you describe.
2. Create a new button on the application landing form - this assumes that all users see the same landing form after a successful login. Let's call it 'btnAdmin'. This button will open the admin form described in step 1.
3. Modify the landing form JS to include:
Code: Select all
if (accessLevel() != "admin_level") {
nuRemove("btnAdmin");
}
As I said, there are many ways to do this but this is a simple one.
Neil