justinmind-logo
 

Displaying content for user, comparing Variable in Data Master

Need Answer Daniel 5 years ago

Hello Community!


I am trying to display Admin tools to people who have logged in with an account that has an Admin role.


Setup:

I have created a Data Master named "Login_Details". This currently holds all the users' Login name, Password and Role.

Role can be either "User" or "Admin".

I track the currently active user with a variable named "Active_User". The users login name gets stored in here if they successfully log in, so that I can easily refer to them throughout the application.


After they sign in, I want to show or hide UI elements depending on this role.

I wanted to use the variable "Active_User" to look at specific columns in a row of my Data Master, see what their role is and use that as a condition to show/hide the UI.


https://www.justinmind.com/community/topic/data_master_value_select_based_on_the_row_comparison_with_variable

The above post has been a great help establishing some logic, but I am not quite there yet.

Something is missing, but I am fairly new to way JustinMind wants us to build the conditions that I am overlooking something probably very obvious.


The attached file shows my current attempt, plus the reasoning that got me there.


Any advise would be greatly appreciated!

Replies (1)
photo
1

Hi Daniel,

If possible, can you upload the prototype to a file sharing service like Dropbox and link to it here? We can offer more concrete guidance that way.

Best,

Danielle

photo
1

Hello Danielle!


You can find the .vp file here; https://drive.google.com/open?id=1t_Gz_iC4doyVzuaE2eXmtaKVe3irrtql


At the moment it is still very bare bones, but just so you know where to look for my 'code';

After logging in, the initial screen, users get taken to the Main screen.

Here you`ll find the "edit users" button, which has a condition to its display. This condition is the problem at the moment, as it does not do what I want it to do :D


Thank you very much for your help.

photo
Leave a Comment
 
Attach a file