Enum remember last selected value

Hi Guys.

Im trying to make Enum remember last selected value, i got like 10 values in the enum, and user can't add his owns. Im trying to make last selected value a initial value, to make a process of adding things faster, but can't sort it our.
been working with MAXROW() but i think i do somethings wrong, most of time it game me an error like :
"The expression is valid but its result type 'Ref' is not one of the expected types: Enum".
So i tried with any select 
ANY(
SELECT(
TABELA AUTOMATYZACJI[Lokalizacja],
[_ROWNUMBER] = MAXROW("TABELA AUTOMATYZACJI", "_ROWNUMBER", TRUE)
)
)
But nothing happens, it just doesnt trigger, nothing shows up, just like the initial value doesnt exist.
tried some other things, but most of time it was an error, or nothing happened like with 2 previes ones.

So i came here with a question, is there any easy solusion for this, that i couldn't find?

Solved Solved
0 2 92
1 ACCEPTED SOLUTION

Try

ANY(
SELECT(
TABELA AUTOMATYZACJI[Lokalizacja],
[KEY COLUMN] = MAXROW("TABELA AUTOMATYZACJI", "_ROWNUMBER", TRUE)
)
)

MAXROW returns a key value and I am guessing you do not have _RowNumber as the key.

View solution in original post

2 REPLIES 2

Try

ANY(
SELECT(
TABELA AUTOMATYZACJI[Lokalizacja],
[KEY COLUMN] = MAXROW("TABELA AUTOMATYZACJI", "_ROWNUMBER", TRUE)
)
)

MAXROW returns a key value and I am guessing you do not have _RowNumber as the key.

Thank you so much! it worked exactly how i wanted ๐Ÿ˜„

Top Labels in this Space