ODK Validate Errors, Survey123

1204
5
Jump to solution
03-29-2019 12:15 PM
Highlighted
New Contributor II

I cannot figure out what is causing this error message when I try to validate my Survey123 form. The error message is attached as well as my form. I've double checked my relevant questions and haven't been able to figure out what is causing this error. The result is only described as invalid.  

Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Esri Frequent Contributor

Hi Lainey,

The error is occurring because of the relevant statement on the ${LSnatural} question, it is creating a dependency cycle. The expression you have entered is referring to itself. You can't have a relevant statement that has an outcome based on requiring the answer from the same question.

Phil.

View solution in original post

5 Replies
Highlighted
Esri Frequent Contributor

Hi Lainey,

The error is occurring because of the relevant statement on the ${LSnatural} question, it is creating a dependency cycle. The expression you have entered is referring to itself. You can't have a relevant statement that has an outcome based on requiring the answer from the same question.

Phil.

View solution in original post

Highlighted
New Contributor II

That fixed it, thanks Philip! 

Highlighted
Occasional Contributor III

Help please,

I have two fields that collect data and one field I want to pulldata().

Is there a correct way to do this I'm getting the ODK error. 

if(${Contract}=pulldata('Contract_working2019', 'ContractName','ContractNumber',${Contract}), if(${LicenseeWriteIn}=pulldata('Contract_working2019', 'ContractNumber','ContractName',${LicenseeWriteIn}) 

Thanks in advance.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

Hi Michelle,

Your if() statements are incomplete; you are not assigning values based on if a value is true or false.  Currently, the logic  you have is:

1. Does Contract equal a value looked up from Contract_working2019 in the ContractName column based on Contract?

   1a.  If Yes: Does the LiceseeWriteIn value equal the value in ContractNumber column based on the value in ContractName equalling the LicenseeWriteIn value?

       1a i.  If Yes: ????

       1a ii. If No: ????

    1b.  If No: ????

I would also check to make sure the if/pulldata statements are doing what you would want - they seem very circular in logic to me (first seeing if a value in the ContractName column matches the value in the ContractNumber column which you are using for lookup, and then seeing if a value in the ContractNumber matches the value in the ContractName column, which is being used for lookup).

Highlighted
New Contributor II

My problem appears to be related to having a ' sigh in the schema name. When I removed them, I was able to publish again. 

Reply
0 Kudos