Skip to main content

Lookup data over elements inside a nested array

Comments

4 comments

  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    Marcelo Borges what does your flow look like? Are you getting the list of orders on the source side of the flow? If so, you just have to set your resource path to "orders", then each record will be an individual order.

    1
  • Marcelo Borges

    Hi Tyler Lamparter, thank you for the prompt information. I am getting a list of orders from the source side of the flow yes.... But I'm not sure I can promote the Orders node as the main node for records, I need to look into that. This actually seems like it would help me doing the lookup for the individual elements of line_items, but I think I may break something else.

    Thanks for the food for thought on this, I'll definitely consider this suggestion.

    If this suggestion cannot be used, does the interface allow for any type of One-to-Many inside a One-to-Many, or that's not possible with the currently UI?

    Just for info: Another suggestion a co-worker suggested after I posted this, is just to work on a script to bring the Items array outside together with the Orders array, and then I would work off that array on my lookup.

    Thanks again.

    0
  • Tyler Lamparter Principal Product Manager
    Awesome Follow-up
    Engaged
    Top Contributor
    Answer Pro
    Celigo University Level 4: Legendary

    Marcelo Borges what is the end goal of the flow and why can't the orders array be promoted to the main node? To specifically answer your question, one-to-many does not support nested arrays so you either need to string two flows together or write a script to bring the nested array up a level. 

    If you don't promote the order array, then you potentially could run into our 5 MB page size limit depending on how many orders are returning in your initial GET request. See help article here: https://docs.celigo.com/hc/en-us/articles/360043927292#Page_size.

    1
  • Marcelo Borges

    Hi Tyler, the use case is that I am batch processing records, and I needed the orders array to be kept as an array. What I ended up doing here is what my co-worker suggested: to build the array that I needed to look up on, outside of the orders array. With that, I was able to run the Lookup, one to many, based on that new array.

    Thanks for the prompt assistance on the day I was having this issue and also, for pointing out that I may run over a 5MB page with my current approach. Tks!

    1

Please sign in to leave a comment.