Thanks for your answers. I have a few more questions.
Why can storing variables in popups cause issues @ihsanzainal84? Are you talking about loading time problems? Also, why are floating groups better for storing hidden variables than popups?
As @georgecollier mentioned, we use hidden variables in popups because custom states canāt easily be dynamic. We also need to set conditions, and we canāt do that right now with just custom states and reusable item properties.
Iām currently reorganizing our our app, and I need help with our hidden variables popups. Iām looking for a balance between an efficient app and a well-organized one. Right now, we use hidden variables popups, but Iām considering changing that.
Hereās an example from our application of how we use the Hidden Variables popup. We store a list of a specific data type, which weāll call Post. Based on the user role, we want to display different data sources.
For example:
- Admins see all posts.
- Teachers see all the posts from their classes.
- Students will only see posts from the class they are in.
So we have a repeating group that we use as a variable called posts with the content type set to Post. This variable has three conditionals for each user role that set the data source to a Do a search for, and we reference this data source in a table for example. Of course, the posts variable is inside a hidden variables popup. Still, it seems to slow down the application, and Iām sure there are better methods to achieve what weāre doing now.
Also, how do you decide and organize who can perform certain actions? For example, again taking the data type Post, we have a reusable element called RE [Post] Controller (which acts as a controller, just like in Ruby on Rails) where all actions go through. From a UI perspective, this controller looks like a dropdown menu.
We always have basic CRUD actions on each controller, and another hidden variables popup called āAuthorizationsā. For each action on the post controller, thereās a variable such as canCreate that checks if a user is allowed to create a post. We do this because we need to have different conditions on that specific variable based on the userās role. So when we add a new action like flagging a post, we create a new workflow (e.g. flag_post) in the controller and add a variable called canFlag in the āAuthorizationsā popup. This variable also has conditions to check if the user can flag the post based on their role.
These variables are then used in the flag_post workflow. Is there a better way to organize this? If needed, I can provide diagrams and screenshots for clarity.
Right now, all of our reusable elements and pages have a hidden variables popup (which stores all kinds of variables), that makes our app sluggish. As Iām reviewing our app to understand why itās so slow, Iām wondering if thereās a better method than what weāre currently using. Any suggestions are welcome!
In any case, Iāll definitely compare storing variables in a floating group instead of a popup to see if it makes our app faster. If thereās an explanation for why a floating group is faster/better than a popup, that would also be great.