Nested ForEach and localVariable

So, I am trying to capture and store nested data from USDA Database - API (image below) 

Now I am trying to store this data in a record - fields being gtinUpc, number, name, amount, and unitName.  I am trying to use the forEach-nested loop example from 

https://docs.appian.com/suite/help/23.1/fnc_looping_a_foreach.html.

However, when I try to nest another forEach and iterate over the foodNutrients, I get errors.  I have tried moving lines around - for example, move line 21 to outside the inner a!localVariables - nothing seems to work. 

As always, any and all feedback/assistance would be appreciated.

Thanks

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to MaNa

    super stupid question? did you watch the record videos in the appian academy?

    get away from the idea of nesting (concept of the old "CDT" world)
    try to use record relations between records. so your task would be getting a correct foreign key relation between your two records. 
    Idea:
    "product code"
    one to many relation
    food nutrients (or how ever the element should be called)

    why not using a record here with the data structure you like to have? Slight smile 

Children
No Data