Showing results for 
Search instead for 
Did you mean: 
Level 8

Incompatible types (Circular definitions)

It seems that Powerapps can have a problem identifying the type of a variable or column of data if that column is referenced circularly. This is not to say that the referencing is truly circular as Powerapps will not allow that anyway. Instead, I have had and may still have the issue where data from a particular column in a table is dependent on a previous cell in the same column. Everything is well defined and works ordinarily, but after I refreshed a datasource that the table was connected to, I got a long list of errors notifying me of an incompatible type. There was not actually an incompatible type error as I managed to solve the problem by removing all the self-referencing defintions and then adding them back in after the errors went away. Has anyone else had this? Do I just need to work around it?

Community Support Team
Community Support Team

Re: Incompatible types (Circular definitions)

Could it be solved by adding a temp Variable to hold the intermediate value?

If you could share more details about the data referencing, then we may provide a more suitable workaround.

Functions that you may have interests:

Understand Variables in PowerApps

Understand Collection in PowerApps




Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level 8

Re: Incompatible types (Circular definitions)

Here is the code in question (as of now):


Collect(SelectedCodes,{CODE:v_CurrentCode, DESC: Last(FirstN(Filter(SelectedCodes,Source<>""), v_CodeIndex)).DESC, Source:"",Row: Max(SelectedCodes,Row)+1,MaxRowID:"False",Quantity:0,UOM:" ",UnitPrice:0,Cost_Type:First(Filter('[dbo].[PO_Generator_CostCodesAndTypes]',JOBCODE=v_Number,CODE=v_CurrentCode,IN_SPECTRUM=1)).Cost_Type,Item_Num:"",Item_Desc:"",SubRow:Max(Filter(SelectedCodes,CODE=v_CurrentCode),SubRow)+1,Tax_Type:"Sales (0.0000%)",Tax_Code:"NONE",PM_Repairs:"P",Notes:""})


No, having a temp variable had the same effect. What is weird to me is that DESC is the only field that has the error, even though CODE is structured (or at least used to be) in exactly the same way. DESC has been the only source of my errors, which, as I have said before, are resolved by replacing all instances of:

Last(FirstN(Filter(SelectedCodes,Source<>""), v_CodeIndex)).DESC          (1)



wainting for all of the errors to go away, and then reinserting my orignal code (1)

Helpful resources


Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Power Platform World Tour

Coming to a city near you


PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Join PowerApps User Group!!

Connect, share, and learn with your peers year-round


Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 46 members 4,816 guests
Please welcome our newest community members: