I have a Select (Drop Down) Field named locations which is supposed to implement the following logic;-
A logged on user who is linked to a location named Head Office should be able to see all locations without a filter i.e.
select LocationID, Location
from Locations
But for any other user outside Head Office the Select Field should only show the Logged on User’s Location i.e.
Select LocationID, Location
from Locations
where LocationID = [V_LocationID]
In summary I am trying to achieve something like below statement, which will work on a Select Field.
if ([V_LocationID]==1)
{
select LocationID, Location
from Locations
}
ELSE
{
Select LocationID, Location
from Locations
where LocationID = [V_LocationID]
}
I’ll appreciate any assistance in resolving this problem.