When it doesn't work, how does it fail? Do you get an empty result? Do you get a ? result?
What limits have been put one what records or tables can be accessed by these users with other privilege sets?
1 of 1 people found this helpful
Text comparisons with ExecuteSQL are case sensitive. A user could log in with "user name" or "User Name" and your SQL statement would return different results. Try:
"SELECT pais FROM permiso_paises WHERE LOWER(cuenta_usuario) = LOWER(CURRENT_USER) "
Go with Greg's answer. I merely wanted to answer your final questions:
"in find mode"? - setting the variable with a calculation (the function, ExecuteSQL, in this case) does not matter even in Find Mode.
"special privilege"? - no privilege on the calculation, but the permission of the fields "pais" & "cuenta_usuario" and the table "permiso_paises" may be limited in your Security set up (only you would know).
& see this comment for suggestions on how to check for errors with ExecuteSQL. (require FMPro Advanced)
Your English was good enough. Feel free to use whatever language you want (both if you think that helps) when asking this forum.
EDITED: p.s. I wanted to add: I probably would set variables before entering find mode, in case I need the values from parameters.
Thank you guys!
case sensitive, my god, I don't even think about it