Event Calculation Help

Good Morning! I’m looking to do a grand total field that just sums up values from other fields below is what i have… though its not working am i doing this wrong?

Below SS of my fields… the Grand Total is what I’m wanting the event to populate.
image

Here is the event set to fire after update… i think this is the one i want to be using?

Here is what the Operations look like… one for each of the 5 fields.
image

Any help is appreciated!

Try throwing curly brackets around your Operands: { }

That’s how you get the “value” of those bindings.

1 Like

Thanks for the suggestion but no joy.
A row update widget is not needed for this correct… as it should be setting that field on the calculation widget or am i wrong?

Worked for me.

Calculation settings:
image

Operations:
image

image

Fields on my form… I used a button to trigger.
image

Correct. The EpBinding on the calculation widget is where the value should end up. No reason for a row update.

You can watch the event in the debugger… do you see values being passed?

Humm maybe its on the event fire then… i had it after refresh.
image

Really i would just want this to fire when a save is made… not on button click… what hook would you recommend?

Perhaps:

Event
Before
OnClick_ToolSave

So, anytime you click the save button, it will run this event before going into the “Save” routine?

If it were me (and this is more work, but may present nicer).

Take the Calculation event you have and set it to No Trigger (delete all the settings).

Then, create an OnChange event for each of your user-entry number fields.

image

image

image

Again, a pain to set up (repetitive)… but now my “results” get recalculated any time you update any of the entry fields.

1 Like

Again thank you for all your help… and i will go that route once i get this even working as im about to punch a wall lol.

so i change to a button to test… but its treating my fields as a string and i cant find out way.

image

Console.

Database.
image

it really feels like Epicor is trying to drive me crazy today.

1 Like

Are you using textboxes or number boxes?

First they were currency boxes… thought that might be the issue then changed all toe number boxes… same issue.

Show me your calculation again… with one of your operands.

You didn’t wrap those in quotes, did you? Because that will tell it to treat it like a string.

And looking at my previous debugging image vs yours… my operators are in single quotes… yours are in double quotes:

Mine:
image

Yours:
image

So… we may need to find out what’s going on there.

The calculation is RUNNING… so that’s good. It’s just concatenating a string instead of performing a calculation.

What version are you on? I’m running in current 2024.2. If you’re on an earlier version, maybe it was a bug that got fixed somewhere along the lines??

I think thats just because i was debugging in firefox… and firefox be firefox.

Chrome shows how you see.

Im on 2024.1.11 so maybe it is the case… sigh i have a sandbox with the latest i guess i can try in that tomorrow at this point i think i need to walk away.

2 Likes