cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NewBee117
Advocate V
Advocate V

Expression nesting too deep. An expression in your formula is nested more than 50 levels.

My Powerapps put a table in JSON format, run a flow to export it as an Excel file, then return the file link saved in One Drive. When the table has four columns, it runs fine. However, when the table has 16 columns, I get an error in the app saying "Expression nesting too deep. An expression in your formula is nested more than 50 levels.". How do I get around this?

 

NewBee117_0-1620218160787.png

The flow runs fine with the same output to Powerapps (4 or 16 columns):

NewBee117_1-1620218295707.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Use the expression editor and that compose value will be something like:

['Parse__JSON']?[All_0x00_OnsiteRESTOFNAMEHERE]

Now its an object with a property of Value, so I think we can use:

['Parse__JSON']?[All_0x00_OnsiteRESTOFNAMEHERE]?[Value]

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

6 REPLIES 6
iAm_ManCat
Super User
Super User

Hi,

 

Try using the JSON() function to convert the data to JSON instead of setting it all manually as a giant text string, this might help with reducing the formula engine overhead. Without seeing the rest of your code its hard to say where the nesting error is,

 

Cheers,

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


NewBee117
Advocate V
Advocate V

I started with JSON(). My data source is a SharePoint list with dropdown control. The JSON() function does not see those columns. The ShowColumns function does not see those columns either. 

NewBee117
Advocate V
Advocate V

Update, I am able to pull the SharePoint list columns, but JSON() returns more than just the actual value of the field. How do I modify the JSON file to show only value, and also, how to update the column header? Thanks.

 

NewBee117_0-1620253347881.png

 

This will depend on how you are exporting those values - what did you do with the JSON function and how does your flow treat that data?

 

I've been thinking about this and I think I would probably do this a different way and get the IDs for each row you are exporting to excel and then have flow use the Get Item for each ID row and then construct your excel file that way by appending it to a string array..

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


NewBee117
Advocate V
Advocate V

Here is the flow (not working):

    NewBee117_1-1620316329394.png

And here is the JSON schema used in the step for Parse JSON:

     NewBee117_3-1620319318724.png

Value for fields like Title shows up correctly in "Select", what can I do to pull value from the ones with type "object"?

    NewBee117_4-1620319726128.png

 

 

 

 

 

 

 

 

 

Use the expression editor and that compose value will be something like:

['Parse__JSON']?[All_0x00_OnsiteRESTOFNAMEHERE]

Now its an object with a property of Value, so I think we can use:

['Parse__JSON']?[All_0x00_OnsiteRESTOFNAMEHERE]?[Value]

@iAm_ManCat


Please 'Mark as Solution' if someone's post answered your question and always 'Thumbs Up' the posts you like or that helped you!


Thanks!
You and everyone else in the community make it the awesome and welcoming place it is, keep your questions coming and make sure to 'like' anything that makes you 'Appy
Sancho Harker, MVP


View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,669)