cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Recursive error in non recursive fields

Two boxes in a form card cause a recursive error but I don't believe its recursive??

DataCardValue1:

If(Parent.Default = Blank(), Concatenate(DataCardValue2.Text,"-",DataCardValue3.Text,"-",DataCardValue4.Text), Parent.Default)

DataCardValue2:

If(Parent.Default = Blank(),"",First(FirstN(Split(DataCardValue1.Text,"-").Result,1)).Result)

Is there something wrong with the code?

Both Parent.Defaults are the same - It's for sort code loading and saving.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver II
Resolver II

Re: Recursive error in non recursive fields

@EricLott 

I somehow fixed it, pretty sure I know why (not 100%)

Replacing it with the static values instead it stopped the error -

 

Value1:

If(Parent.Default = Blank(), Concatenate(DataCardValue2.Text,"-",DataCardValue3.Text,"-",DataCardValue4.Text), Parent.Default)

 

Value2:

If(Parent.Default = Blank(),"",Last(FirstN(Split(Parent.Default,"-").Result,1)).Result)

 

I get why it wouln't allow the previous version but it should 🤔

View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

Re: Recursive error in non recursive fields

DataCardValue1:

If(Parent.Default = Blank(), Concatenate(DataCardValue2.Text,"-",DataCardValue3.Text,"-",DataCardValue4.Text), Parent.Default)

DataCardValue2:

If(Parent.Default = Blank(),"",First(FirstN(Split(DataCardValue1.Text,"-").Result,1)).Result)

My guess is that both controls are looking to each other to get their value. That's the recursive error.

Highlighted
Resolver II
Resolver II

Re: Recursive error in non recursive fields

@EricLott 

They don't look at eachother though?

If parent is blank then value 1 is based on value 2

if parent isnt blank then value 2 is based on value 1

either way it is one way association of code?

Highlighted
Super User
Super User

Re: Recursive error in non recursive fields

**Edited

 

Nevermind I see what you mean. I'll look again

Highlighted
Resolver II
Resolver II

Re: Recursive error in non recursive fields

@EricLott 

I somehow fixed it, pretty sure I know why (not 100%)

Replacing it with the static values instead it stopped the error -

 

Value1:

If(Parent.Default = Blank(), Concatenate(DataCardValue2.Text,"-",DataCardValue3.Text,"-",DataCardValue4.Text), Parent.Default)

 

Value2:

If(Parent.Default = Blank(),"",Last(FirstN(Split(Parent.Default,"-").Result,1)).Result)

 

I get why it wouln't allow the previous version but it should 🤔

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,491)