The question is quite old but since I had the same problem and just found the answer I'd like to provide it to the community.
The word 'encoded' is already giving a hint. A glide record on a database view cannot be used with an "addquery('sys_id', <e...