Jump to content
  • 0

Triggered Action Not Working


SydneyH

Question

I have a triggered action setup with the goal of replacing the "Account Balance" in one table, based on entry into the other table. The triggered action is currently setup to add the newly deposited amount to the existing balance. The task validates but won't populate the data as intended unless I remove the "addition problem". If the task is set to update 'Account Balance = #inserted.DepositAmount' it will run successfully. Has anyone else experienced this issue? I have  nearly identical tasks within other tables of my application that function as intended with subtraction of similar variables. 

image.png.8b8087333495e8edf9e8c3025734dedc.png

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Hello @SydneyH,

Is the 'AccountBalance' field blank initially?

If yes, this means that it stores NULLs. And when we add anything to NULL the result is NULL (blank).

This NULL should be replaced by zero:
gL8SriQ.png

Do you need to run this Trigger on Update as well? I can see the 'Update' action on your screenshot but in the text, you only describe the 'Insert' action (adding new entries).

Please note that the logic on Update is different. If you need assistance please let me know.

Link to comment
Share on other sites

  • 0

Thank you for explaining this so thoroughly.

I believe we can run the trigger on Insert only, vs. both insert and update. We are tracking each deposit as its own line item upon entry/insert. The starting balance for every new participant is always 0, which is likely where my problem was considering the 'case' logic was not implemented. This fixed our issues. Thank you so much!

 

-Sydney

Link to comment
Share on other sites

  • 0

I have a similar problem

I have a table the holds the agregate data of dried coconut from a number of growers who delivered bags of green Coconut to the processor.

For each batch we have multiple delivery receipts from the grower with the number of bags and the total weight in kg of green copra.

In the grower purchase table for every receipt entry I need to add the weight and the number of bags to the batch total green weight field in the batch table.

The index field is the batch id.

I have been working on triggered actions for a week and still can't get it 

So the trigger should be 

Insert a new record in the grower purchase table and ad the weight from the weight field to the total green weight field in the batch table for each record  where the batch id is the same

So I get the sum of the weights for all receipts with the same batch number.

image.png.8e18c82aed05b28ad1592b99cc84cd5c.png

I think I am missing something

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...