Help Needed with Quickbase Pipeline to Accumulate Values Instead of Overwriting
Hi Quickbase Community,
I am facing an issue with a pipeline designed to add quantities to an existing field in my Quickbase app, but it keeps overwriting the existing values instead of accumulating them.
Context:
- Tables Involved:
- Transactions: Records of items being added or removed from containers.
- Containers: Contains fields for tracking quantities of different items in specific compartments.
- Fields Involved:
- Transactions Table:
- Action Type: Indicates the type of transaction (e.g., "Add Item to Container").
- Container Compartment: Specifies the compartment (e.g., "Compartment A").
- Container ID: The ID of the container to which the item is being added.
- Item Name: Name of the item.
- Item Quantity: Quantity of the item being added.
- Containers Table:
- Compartment A Quantity: Field to store the quantity of items added to compartment "Compartment A".
- Transactions Table:
Current Pipeline Configuration:
- Trigger: On new or modified records in the Transactions table where Action Type is "Add Item to Container".
- Condition: The compartment is "Compartment A".
- Lookup Step: Fetch the current value of Compartment A Quantity from the Containers table.
- Update Step: Add the new quantity to the existing value of Compartment A Quantity.
Issue:
Despite various attempts, the Compartment A Quantity field in the Containers table is being overwritten with the new quantity instead of adding the new quantity to the existing value. Here is the current Jinja expression used in the update step:
jinja
{{ (b["Compartment A Quantity"] | default(0) | int) + (a["Item Quantity"] | int) }}
Steps I Have Taken:
- Verified the field types and names.
- Ensured the pipeline permissions are correct.
- Tested with different variations of the Jinja expression to accumulate values.
- Checked pipeline logs for errors or issues.
Request for Assistance:
I am looking for a solution to ensure that the Compartment A Quantity field accumulates the new quantity with the existing value, rather than overwriting it. If anyone has faced a similar issue or has any suggestions on how to resolve this, your help would be greatly appreciated.
Thank you in advance for your assistance!
Best regards,
Tom