Page 1 of 1

Dropdown record filter

Posted: Sat Dec 31, 2022 5:14 am
by crash

I am trying to run a filter when I edit or add, I want the records in the dropdown selection to only show the same as from the current user.
I am doing this in Filter Editor in the Lookup Table

Eg the current user country = USA
In filter editor "country = 'USA'" this works

I need to use CurrentUserInfo("country")

My code is:
"country= 'CurrentUserInfo("country"))'"
I have also tried
Convert.ToString(CurrentUserInfo("country"))

I get this error CS1002: ; expected

I need the right code to put in the filter editor
I have looked at the help files and tried lookup selecting but this does not work
Please and thanks


Re: Dropdown record filter

Posted: Sat Dec 31, 2022 6:28 am
by MichaelG

Try:

"country= '" + Convert.ToString(CurrentUserInfo("country")) + "'"


Re: Dropdown record filter

Posted: Sat Dec 31, 2022 12:22 pm
by crash

Thanks that works, appreciate it.