How do I hide / disable inline system referen...

references
(David Joyce) #1

How do I hide / disable inline system reference actions?

A user should be able to see the addresses assigned to others, and also be able to add new addresses. But the problem comes when user #1 adds a new address from a reference view (see screenshot) while viewing User #2’s addresses, because the app pre-fills the Assigned To field to User #2 and User #1 cannot change it because only admins can assign addresses.

(Aleksi Alkio) #2

So… the normal user should only see this inline view and only admin is able to add or modify new record, correct?

(Michael) #3

@Aleksi_Alkio @David_Joyce How about hiding the ‘New’ (Add) action based on matching the user names. So, if the user name doesn’t match the name in the associated view, the action is hidden. More information is need about how the tables are setup.

(David Joyce) #4

@Aleksi_Alkio The ideal solution would be i) to somehow clear the pre-filled [Assigned To] field whether it is a normal user or an admin user that is looking at the inline view. If thats not possible, ii) hiding / disabling the Add new record from the inline view would be the next best option. Of course, any user should still be able to drill down and View the records. Your option iii) is acceptable, but would mean that the admin user would have to remember to clear/set the Assigned To field when adding a new record, whereas normally they wouldnt do this from the main Address view. It seems a little complicated!

(David Joyce) #5

@Michael So only allow a user to Add a new record if they are looking at their own assigned addresses.

This would mean they would assign themselves to a new address, but I think this would be acceptable if the the other options I mentioned are not possible.

But still, how to disable the Add button?

Would you like access to see the app in action? @Aleksi_Alkio @Michael?

(Aleksi Alkio) #6

You could create another REF_ROWS virtual column for the inline view and use a Read_Only slice as a source for that. Then you can decide which one of these virtual columns you want to show depending on the user’s email address or role.

(David Joyce) #7

@Aleksi_Alkio Ok, thanks for the suggestion