Error "callNative() can't handle nodeset functions yet for instance()" when editing submission

1. What is the issue? Please be detailed.
We have set up ODK central and all is working fine except editing submissions. We have have set up a cascade select county then filter settlements. This is working fine on Collect but on editing in Enketo it throws this error.

Error occured during the loading of this form. We do not recommend you edit this record until this is resolved.

Please contact with the link to this page and the error message below:

FormLogicError: Could not evaluate: instance(settlements)/root/item[name = 'Ngunyumu']/settlement_code, message: callNative() can't handle nodeset functions yet for instance()

2. What steps can we take to reproduce this issue?

3. What have you tried to fix the issue?
Not yet gotten a way out....

4. Upload any forms or screenshots you can share publicly below.
As above

We will need a form definition to be able to troubleshoot this. Can you please share it either here or in a private message if you can't share it publicly?

Alternately, here is a line of thinking that might help address the issue without needing the whole form. Is instance(settlements)/root/item[name = 'Ngunyumu']/settlement_code the literal expression in your form? If not, can you share the full expression? Is it possible that this returns multiple values (multiple items with name 'Ngunyumu') but you are using it in a context that expects a single value?

I believe this should be instance('settlements') as the argument should be a string (it is a nodeset currently).


Wow, good catch! If @Felix_Mutua you confirm adding quotes fixes the issue we should work on Collect showing an error when quotes are omitted and making the error messages more helpful in both clients.


Thanks @martijnr and @LN. Adding the single quotes sorted out my problem. Thanks a lot.