Calculation Warning: How to identify location of circular references in XLS form

983
3
Jump to solution
07-21-2023 10:56 AM
Katie_Clark
MVP Regular Contributor

Hello,

I have a survey with several complex calculations in it, many of which are defined in javascript functions. I see this warning when I am in Survey123 Connect, but I have not been able to identify where this circular reference is. Are there any tips to being able to identify where this issue might be in the XLS form? 

Katherine_Clark_1-1689961979920.png

Katherine_Clark_0-1689961922247.png

I've tried error checking within the formulas tab or Excel but the circular references option is greyed out.

Katherine_Clark_2-1689962129459.png

Thanks!

 

 

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @Katie_Clark

Circular references typically occur when there is an expression in the calculation column that references itself. Another spot would be using the indexed-repeat() or another aggregate function within the repeat itself. 

Unfortunately since Survey123 uses the XLSForm specification instead of Excel formulas the formula processing tools that are available in Excel won't work. 

Thank you,
Zach

View solution in original post

3 Replies
ZacharySutherby
Esri Regular Contributor

Hello @Katie_Clark

Circular references typically occur when there is an expression in the calculation column that references itself. Another spot would be using the indexed-repeat() or another aggregate function within the repeat itself. 

Unfortunately since Survey123 uses the XLSForm specification instead of Excel formulas the formula processing tools that are available in Excel won't work. 

Thank you,
Zach
Katie_Clark
MVP Regular Contributor

@ZacharySutherby   Thanks so much for your response and additional information about how the XLS Form works.

In my case, it was the indexed-repeat as you mentioned. I'm using position(..) in a repeat question to create ID's for each entry based on it's position in the repeat. This works as intended in the survey and isn't causing issues as far as I can tell.

Best,
Katie


“The goal is not simply to ‘work hard, play hard.’ The goal is to make our work and our play indistinguishable.”
- Simon Sinek
0 Kudos
KenBouchard
New Contributor III

I've just created a new form, with the exact same idea as you Katie.

As you said, work as intended and doesn't seem to cause issue.

Since a couple of month passed since your post, would you still say that referencing the position(..) in a repeat don't cause any problems?

I don't want to go too far in creating my form to realize it's causing issues later...

Thanks,

 

Ken

0 Kudos