Hi
I have a flow that pulls in product inventory counts from shopify and compares it to my product inventory counts in airrtable.
This results in this data set:-
At the moment, when this runs it updates all 260 products in Airtable
{
"fields": {
"Variants: Id":"{Variants: Id}",
"Variants: Sku":"{Variants: Sku}",
"In Stock":"{Variants: Inventory Quantity (1)}"
},
"typecast": true
}
However, I’d like to add a step in my flow that only sends the products with inventory that has changed, to airtable.
I’ve tried adding a Remove Rows step but this doesn’t seem possible to configure.
In essence I only want to update rows in Airtable that have different Inventory Quantity from that in Shopify. Is this possible?
Thanks
Jonathan
brian
August 24, 2020, 8:25pm
2
Hey Jonathan!
I think I see two Quantity columns, so could you use the Remove Rows step to only keep rows where Quantity Column 1
Does Not Equal Quantity Column 2
?
Also, you will need to replace your blanks in one of the quantity columns to be 0’s for the above to work. To do so, use a ReGex step to find ^$
and replace it with 0. That ^$
is the expression for a blank cell.
brian:
^$
Thanks Brian - how do I reference the other column? It doesn’t allow me to actually select a column, just add a value
Thanks
Jonathan
It seems I can add a value but not choose the field to compare to the first quantity field. I can type the field name in but it has no effect.
sachi
August 25, 2020, 7:44pm
5
@Jonathan_Lyon Try using the Insert If/Else
step first.
As you can see, by wrapping my column names in curly braces {}, I can reference the data in another column.
Then, you’d use the Remove Rows
step to filter for rows where the If/Else
determined that Quantity Column 1
does not equal Quantity Column 2
.
Let me know how that goes!
Hi Sachi
That’s what I ended up doing before you sent your solution but thank you
Thanks
Jonathan
3 Likes