Hi there, I have an automation to automatically add item stock when there is item with the same name in the Item List Table. Now, I have 2 items with the same name but in different location. The item ID are ID 3 in location A and ID 12 in location B. When I added stock to ID 12, the ID 3 stock is increased instead. How to work around this thing? Here's my syntax for the automation:
{
"Action": "Edit",
"Properties": {
"Locale": "en-US",
"Location": "47.623098, -122.330184",
"Timezone": "Pacific Standard Time"
},
"Rows": [
{
"Location": "<<SELECT(Item List[Location], ([_THISROW].[Location]=[Location]), TRUE)>>"
"ID Item": "<<FILTER("Item List", [_THISROW].[Item Name]=[Item Name])>>",
"Stock": "<<ANY(SELECT(Item List[Stock], [_THISROW].[Item Name]=[Item Name]))+[_THISROW].[Stock]>>"
}
]
}
Thank you for your help and attention
Solved! Go to Solution.
@agnispremz wrote:
"ID Item": "<<FILTER("Item List", [_THISROW].[Item Name]=[Item Name])>>",
You should probably modify this to
<<FILTER("Item List", AND([_THISROW].[Item Name]=[Item Name], [_THISROW].[Location]=[Location]))>>
@agnispremz wrote:
"ID Item": "<<FILTER("Item List", [_THISROW].[Item Name]=[Item Name])>>",
You should probably modify this to
<<FILTER("Item List", AND([_THISROW].[Item Name]=[Item Name], [_THISROW].[Location]=[Location]))>>
Thank you for the answer, it works wonderfully. I don't know that you can use conditional in automation body
User | Count |
---|---|
40 | |
34 | |
28 | |
23 | |
17 |