Multiple entries on inventory adjustment table in one trigger

Hello All,
I’m setting up a Finished Goods Inventory table and want to make three adjustments to one record with each entry - the ID is the part number of the product we are making.
It will be a trigger to a) increase finished goods based on a variable of finished goods produced b) store total good parts amount in qty last production run column and c) store last production run date in the designated column.
I only seem to be able to record a) in one entry - b) and c) don’t appear.
Any ideas on how to resolve this?

Thanks!

hello @kristendanson,

thanks for this question!! could you share a screenshot of the trigger where you’re seeing the issue?? and is the Trigger executing on a button click??

I set up a quick demo that should be what you’re looking for based on what I’m understanding.

here is the app to get the user inputs:

here is the trigger:

resulting Table:

am I understanding the app you’d like to build correctly?? let us know if this helps!!

Thanks so much for the prompt reply!
It’s actually an inventory table


So what I wanted to do was load the record into app, and then leave the ID but update the amounts and the date of the production run. In a daily shipping app I will then update the last date of shipment, and decrement the inventory amount. This will give me live data on the current inventory.
This is the trigger to load the table record

Then this is the trigger to store the data

Appreciate your help!

Sorry - last post didn’t show the increment inventory trigger line

hello @kristendanson, thanks for sharing this!!

the issue is with the DATE-TRUNC_TZ() function. because the column is of type Datetime in the Table, if you store the entire @App Info.Current Date and Time to that column, the trigger will store the data as expected.

let us know if that works and thanks again for posting to Community!!

That works perfectly - thanks, Gio!

1 Like