Get a runtime list of espace / module screens?

Get a runtime list of espace / module screens?



I've been struggling a bit with one use case I need to implement. I have:

  1. a mobile app with multiple screens
  2. some screens restricted by specific roles
  3. dynamic navigation (=dashboard) based on
    1. user roles vs screen roles - only screens with suitable roles are shown
    2. user selection - user is allowed to hide / show what screens are shown in the navigation

Optimally, I would need a list of screens within my application. This list would contain:

  1. screen name
  2. screen "end point" (= target I can navigate to)
  3. roles who can access this screen (= design time checkboxes for screen in Service Studio)

I intended to filter this list based on user's effective roles (from database) and app settings (local database). However, I think this is more easily said than done, as I cannot find any way to obtain even a part of such list.

I can see OutDoc manages to pull off something similar (a list of screens for espace), but this is through some extension magic and the source code for said extension is not included in OutDoc. OutDoc's xml contains something called RoleReference, but this is not accessible through visual coding (or without extensive knowledge on how .oml files are actually built). In any case, this approach has some problems.

I tried an approach of separating UI flows to own espaces, from where I was able to populate a list loosely matching my criteria, but this results to an unbearable application structure.

Any good ideas?

Bonus poll: Will I end up hardcoding / duplicating something that is already there, but not available?

Hi Mikko,

It was not the same use case. But in the past, I needed to get the screens for each module.  In that time, I got my main actions from this project:

It has some queries and use an extension to get this information. In fact this component could be very useful for your use case or give you some ideas to implement it. See this video: to more details.

Best regards