Help

Re: Problem with "Can't save field because it causes a circular reference" error

1759 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Rey_Crisostomo
6 - Interface Innovator
6 - Interface Innovator

I am trying to manage a data dictionary and generate XSD (XML schema definition) as part of managing API definitions in our project.
However, I keep getting blocked by this error.
Here is an example base (I stripped down all columns that are not relevant to the XSD generation):

The formula for column XMLElementDef of table Attribute should be:
IF(IsPrimitive, "<xs:element name=\"" & Name & "\" type=\"xs:" & DataType & "\"/>", DataTypeXMLElementDef)
but the else part of the IF - DataTypeXMLElementDef - cuases the circular reference error.

Recursive structures are necessary to many of my bases because many of the data I am managing is naturally hierarchical in nature (XML, JSON, folder/directory paths, org structures, etc).
I understand that endless recursion can kill the platform but I would suggest that the limitation should be done at runtime and detect a maximum # of levels of depth before giving out an error. Otherwise, this tool becomes severely limited for some applications.

Does anyone know of any workaround in the meantime?

Thanks in advance!

2 Replies 2
Rey_Crisostomo
6 - Interface Innovator
6 - Interface Innovator

I created a simpler example to illustrate my problem.
Here is the base: https://airtable.com/invite/l?inviteId=invD1UFeDZHdOkhuD&inviteToken=f09215f8c21ddc2de45b656c06b84fd...

The column Manager is a link to the same table (Employee).
The column ManagerPath is a lookup to the Manager link’s Path column.
The Path and ManagerPath columns are empty because I cannot enter the correct formula for Path because of the “circular reference” error.

The formula for the Path column should be: IF(Manager != "", ManagerPath & "->", "") & Name
Given the above formula, the values of Path and ManagerPath would have been:
image

I think this should be a valid scenario and that the recursion should be allowed (up to a pre-defined limit of levels to prevent endless recursion/loop).
Can anybody help?

Although circular references may make sense to humans using Airtable, the fact is that Airtable does not allow them.

This support article on Common Formula Errors discusses circular references.

There are several workarounds including using scripting block, or a control table/record, or bridging a gap in the circular logic with copy/paste.


If this answers your question, please mark this post as the solution. Otherwise, could you please give a bit more details and a screen capture?