Skip to main content
Question

Create filter to compare numbers of Products against numbers of Amounts in line items.

  • May 16, 2025
  • 7 replies
  • 38 views

As a final check before creating an invoice in QBO I want a filter to stop the Zap if the number of Products found in the QBO ‘Find Product’ step is not equal to the number of ‘Amounts’ which is created in the previous Python code step. The code step strips out any fields amounting to 0 but I still want an additional check .  If there is a mismatch in these line items the names of the products will not align with the correct amounts in the invoice. I need a no code filter if possible but I do not see how to compare the number of items in each of these outputs.

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

7 replies

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • May 16, 2025

Hi ​@Coburn123 

Filter help: https://zapier.com/apps/filter/integrations#help

 

In the Python step you can output a variable that is the # of the items.

You can use Formatter steps to get the number of items returned from QBO.

Then you can compare in a Filter step.


  • Author
  • Beginner
  • May 16, 2025

Thank you for the help Troy,  1.In Formatter/Numbers I don’t see a count option to use for the number ov QBO item . 2.  I do not have programming skills but used  AI prompts to eliminate 0 items from each line item.  How would you suggest adding a prompt to that step to find the # of items.


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • May 16, 2025

@Coburn123 

To use Formatter is a bit involved as it involves a series of steps to prep data to then be able to count the data.

 

Instead try this Zap action: AI by Zapier - Analyze and Return Data

You can instruct the AI to count the input field.

You can configure the output field to be a number.


  • Author
  • Beginner
  • May 16, 2025

That worked.  I created two AI by Zapier steps Step 1 Counts the number of  products found by QBO.   Step 2 Counts the number of values created by the Python code step. And finally I added a filter to compare the two outputs and stop the Zap if they are not matching, I don’t know if I could have done it with just one AI step for both results. And finally since the zap is working correctly I don’t know how to create an error to test but I will figure it out.  So thank you for the help.


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • May 16, 2025

@Coburn123 

You should only need 1 AI by Zapier step that can generate both counts for you.
2 INPUTS

2 OUTPUTS


  • Author
  • Beginner
  • May 16, 2025

I see the two input fields connected by an ‘and’.  Is there a correct way to format the prompts to distinguish the prompt for the first input  from the prompt for the second input?


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • May 16, 2025

@Coburn123 

You would need to post screenshots to give us context about what you are referring to.