Page 1 of 1

Restrict Lookup Value Based on Current User Level

Posted: Thu Apr 06, 2023 7:47 pm
by aspsteve

One of my lookup tables has the following fields
[StatusID]
[ApprovedLevelName]
[ApprovedLevelID]
[AvailableStatus]

I would like to restrict the displayed lookup values available to the user to the list of AvailableStatus that corresponds to thier CurrentUserlevel (ApprovedLevelID)

I tried the following code in the filter field

"AvailableStatus Where CurrentUserLevel() IN ApprovedLevelId "

I know it is bad code and I need some help


Re: Restrict Look Up Value Based on Current User Level

Posted: Fri Apr 07, 2023 10:42 am
by MichaelG

Use the Lookup_Selecting server event. Read:
https://aspnetmaker.dev/docs/#/customsc ... _selecting