Hi, Iโm extremely new to appsheet, I started learning it about a week ago.
My Problem: I have a column(Approval) and I have 2 types of users (Writter and Supervisor). In the form I the writter uploads the document and the supervisor reviews the entry and gives approved or rejected status I wanted to show this enum buttons only to supervisor so I used ( IN (USEREMAIL(),Select(user[User Email],[Role]=โSupervisorโ))) But this gave me another issue. In the deck view for Writters It has the same column (Approval) as summary, So a writter can quickly see if an entry has been rejected or approved this no longer happens as the above expression prevents anyone other than supervisors from seeing it.
How do I overcome this any help would be much appreciated and please dont go too advanced on me
Solved! Go to Solution.
OK I found a solution in options called Apply Show_if universally under forms section turning this off and reverting back to my old show formula WORKED
but Iโve no idea if there are dire consequences or if it is not best practice can you let me know if there is any issue going with this route?
Hello @Thilina, welcome to our community !
Given your use case, you might find it better to limit the edit permissions of the (Approval) column instead of its show permissions, that way your writters will be able to see the approval status of their entries, but wonโt be able to change them in any of your views.
This change would mean moving your expression from the show_if to the editable_if fields directly.
Thank you for the quick reply I thought about doing this and was gonna use it as a last resort as I would not be as clean but Iโm honestly no expert so I will go with your suggestion.
On a quick side note is there a way to create a virtual column and fill it with whatever the value is in the approval column. My logic being keep show_if as it is and create a virtual column to look up the value of approval column and store it in the virtual column which can be displayed in the summary
Edit: I have done as you suggested but this doesnโt show the buttons greyed out(like my autocompute ID) as I expected but only shows the lable and nothing below it
If youโre adamant about this configuration, you could use a more robust expression that would allow you to show your (Approval) field only where it is needed, for example:
IF(CONTEXT("View")="Document_form", IN (USEREMAIL(),Select(user[User Email],[Role]=โSupervisorโ)),TRUE)
This expression checks if the user is currently at your document form view, if it is, it then checks if the user is a supervisor, IF the user is a supervisor, then he can see the field, if heโs not, he canโt.
If the user isnโt currently at your โDocument_formโ view, then it shows it to all users.
The thing with managing only the show_if when trying to limit permissions is that your users wonโt be able to see any fields they are not allowed to edit, so itโs often a good idea to mix up edit and see permissions to get the results youโre looking for.
Iโm no expert either, this is only my opinion hehe.
Yes, check out this link: Virtual Columns | AppSheet Help Center
You can try setting an initial value for your approval enum, like โpending for approvalโ, if that fits you, could you share a screenshot of your approval column configuration? itโs the screen that appears once you click the pencil icon next to the column name.
I already did that but for filtering purposes (Separate slice to only show entries that havenโt been looked at)
This issue prevails
I meant the screen that will pop up when you click here:
OK I found a solution in options called Apply Show_if universally under forms section turning this off and reverting back to my old show formula WORKED
but Iโve no idea if there are dire consequences or if it is not best practice can you let me know if there is any issue going with this route?
Oh yes, thatโs a solution as well, i didnโt think of that .
Well, it wonโt let you use show_if parameters outside of your forms, thatโs the only consequence, i use show_ifs a lot in my apps outside forms myself, but that depends only on how youโd like to build your app.
Can you clarify with a example because I am using show_if in other views normally
PS sorry if I am getting annoying XD
You are? then it is not working as expected, but hey, if it works how youโd like it to, its great.
Hope these images have what you are looking for my screen is a small chromebook so i cant get everything in one shot
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |