Hi there,
I have a table recording items in an inventory adjustment, the table is called "Inventory Adjustment Items", whose columns are:
I also have a table called "Inventory Adjustments" recording the inventory adjustment itself, which has columns:
Finally, I also have a table, called "Inventory Stock Balances", recording the latest inventory quantity snapshot for a Department, Section, and Inventory Item Id combination.
I try to create a webhook API action as follows:
<<START: [Related Adjustment Items]>>
{
"Department":"<<[_thisrow].[Department]>>",
"Section":"<<[_thisrow].[Section]>>",
"Inventory Item Id": "<<[Inventory Item Id]>>",
"Latest quantity": "<<
ANY(SELECT(Inventory Stock Balances[Latest quantity],
AND([Department]=[_thisrow].[Department],
[Section]=[_thisrow].[Section],
[Inventory Item Id]=[Inventory Item Id]
), TRUE)) + [Quantity]>>",
}
<<END>>
The highlighted Inventory Item Id filter above (bold and italics) does not work. I think the expression is confused by the exact same name of the column filter and the column reference in the "Related Adjustment Items" loop.
Is there any way to fix this confusion? Basically, I want to increment the Inventory Stock Balance record matching the Department-Section-Inventory Item Id key with the quantity input in the adjustment item record.
Latest quantity = select latest quantity with the key + Quantity input.
Thanks in advance for your help,
-- Hendi
Solved! Go to Solution.
@devmasadajaya wrote:
I think the expression is confused by the exact same name of the column filter and the column reference in the "Related Adjustment Items" loop.
Is there any way to fix this confusion?
Maybe I have not understood the issue precisely. However if the error is just because of identical name, is it possible that you can slightly change the names of the column in respective tables and test once?
Something like
[Inventory_Item_Id_IA] for the column name in Inventory Adjustments table and
[Inventory_item_Id_ISB] for the column name in Inventory Stock Balance table?
User | Count |
---|---|
23 | |
15 | |
4 | |
3 | |
3 |