Change Navigation Menu Dynamically

0
Hi experts, I want to change the menus shown on navigation bar dynamically. Since the navigation tree and the number of user role is very large, it is not developer-friendly for setting one by one. and also not user-friendly if the navigation is large. Would you help please help me with three questions below?   ①Is it possible to control what menus are shown on navigation bar? ②Is it possible to import/export the navigation menu? ③I recognize setting a user roles would also be a possible way of changing the navigation menu dynamically. Is there any ways to control hundreds of user roles? (Importing/downloading, sql...etc)   Thank you in advance,  Regards, Yuki
asked
1 answers
1

I dont know what those 100 user roles does, so I cannot advice whether to optimize them or not. But as a general rule, I would suggest to look in to the need of 100 user roles, as they are the basic building block of your app, having so many roles might have different implications in access rules and so on in the future.

But only answer your question

1) As you already figured out, menu items in navigation bar can be controlled by the permissions for the Microflow or page. If the logged in user does not have access, he does not see the menu. 

2) There are three types of menu widgets you can find

And with all the widgets, you will be able to select Menu source.

If you are using default layouts, then they are using Menu bar with default Project navigation.

These Menu documents can be exported and imported by “Export document to file” option

3) You can look at the list of user roles from System.UserRole. So, technically yes, you can create pages to list user roles, export or even query from your database. But importing or changing or playing around with the records is not advisable.

answered