Hi all,
[What I want to accomplish]
I want to judge whether data in a value in my line-items has a specific search words.
For Example, line-items are like this:
-----
groups:
1:
group_id : price_1Aa
group_pk : 67
2:
group_id : price_1Bb
group_pk: 66
3:
group_id : price_1Cc
group_pk : 65
-----
I want to judge whether "group_id" (a value in line-items) has "price_1Aa" (data in line-items) or not.
Is there any good ways to judge above?
I want to use Zapier support Apps like Formatter by Zapier, more than Code by Zapier.
As a condition, I can't control the order or number of line items that are going to come in. At least, 1 line-item comes in.
>What I did]
1) Formatter => Text => Find
It doesn't work as I expected, when "group_id" has data "price_AaA",and my search word is "price_Aa".
It is because "Find" judges whether "price_AaA" contains "price_Aa", but can't judge "price_AaA" is exactly "price_Aa" or not.
2) Formatter => Number => Spreadsheet-Style Formula
I tried the following zapier article below.
My formula is like this:
IF("price_1Bb, price_1Aa"="price_1Aa","65,67","")
However, nothing is extracted like below in Test action.
-----
output: 1:
-----
Plus, I think this approach is not best because this formula does not return just true or false.