How to show certain columns depending on the view

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 Solved
0 10 799
  • UX
1 ACCEPTED 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?

View solution in original post

10 REPLIES 10

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


Thank you for your help

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

Top Labels in this Space