How to Prefill a Value when Column Type is REF

mykrobinson_0-1683914385176.png

how do i accomplish the above when REF is the column data type?

What i am hoping to have happen is for the column to suggest the current user's name based on useremail(). My "Valid If" is working but i can't get the Initial Value to work.

Thanks

Solved Solved
0 4 185
1 ACCEPTED SOLUTION

If [UserID] is the key value of the user roles table/ slice, then please wrap your above expression with ANY() and try.

Meaning ANY (Select ...))

 

 

 

View solution in original post

4 REPLIES 4

If [UserID] is the key value of the user roles table/ slice, then please wrap your above expression with ANY() and try.

Meaning ANY (Select ...))

 

 

 

that worked, thank you. and double thank you, because i think it finally clicked why you would use ANY(). Is it's purpose somewhat to take an expression that is correct with regards to syntax but force it to work for ANY data type?

The issue with your initial expression was that it was returning a list of values, but only one value should be specified. 
ANY() is not a function that makes it "work for ANY data type". ANY() is a function that picks one value in a list of values. So your final expression will work here if either (1) your SELECT expression returns a single value and it is the one you expect or (2) your SELECT expression returns a list of values but they are all the same values. 

Thank you very much @Arthur_Rallu for chiming in. I could not respond to @mykrobinson's final query as I had already retired for the day as it was late night here.

Hi @mykrobinson : @Arthur_Rallu  has beautifully explained. Please also take a look at the help article on ANY() for more examples etc.

ANY() - AppSheet Help

 

Top Labels in this Space