Skip to main content
Question

How to get single line item with all its fields?

  • July 31, 2024
  • 4 replies
  • 284 views

Hi there,


I’m stuck on the following issue: my trigger returns an “order” object with an “items” array inside it. Each item contains some information that I need, but this is duplicated across all items. For example, each item might have a field “name” with value “Steve” (always the same value). What I want is to use the “name” field only from the first “item” and skip it for every other “item”. I can use the Formatter → Pick from list utility, but I need to create one step per field, and I have many fields I need to extract.

Is there a way to do this in one step, i.e. pick the first line item with all its fields, and skip the others?

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

4 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • July 31, 2024

Hi @goosebay 

Resources for handling line items in Zaps:

 


  • Author
  • New
  • July 31, 2024

Thanks, not sure if this is the best/only way but I solved it in the end by using a Loop with only 1 iteration.


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • July 31, 2024

@goosebay 

Yes, that is a viable approach to use.


JammerS
Forum|alt.badge.img+6
  • Zapier Staff
  • August 1, 2024

Hi @goosebay,
 
We just wanted to see how everything is going with your Zap. Did Troy's recommendation get the job done? Feel free to reach out if you need further assistance with your Zap. We're glad to address any concerns and assist you.
 
We're looking forward to your response.