
Hi everyone,
I am trying to implement some security on a drop-down box. The drop-down's data source is a table in the CDS. I would like it so that users are only able to select their own name from the list but a supervisor is able to select everyone.
Is anyone able to point me in the right direction to do this?
Kind regards,
Matt
Am assuming that Username in the CDS Table is the same as in User().FullName
I lso believe you have a column in the table for positions.
Having said that;
1. Create a variables OnStart of the App;
Set(LoggedUser,User().FullName);
Set(LogedPosition, LookUp(TableName, UserNameColumnn= LoggedUser, PositionColumn)
2. Then filter the Dropdown Item property as;
If(LogedPosition = "Supervisor", TableName,
Filter (TableName,UserNameColumn = LoggedUser))
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.