Send original and changed data in VendBank table

hi, I am trying to create a message (email) showing what has been changed when an update is made to the Vendor Bank file. I have the condition to determine it there are changes, I am able to send an email with the changed data, however, I cannot figure out how to show the original data.

Help!!

Thank you

Hi Wayne.

I cheated. I wrote a BPM on the ChgLog table which contains the before and after values and send the email from there. It’s important to quickly exit the directive since data directives are called often for ChgLog.

Hi Mark, I tried looking at this, however, ICE.ChgLog only shows what field was changed and what it was changed to. Chglog.LogText =
whaire 14:35:11
RowMod: → U
Address3: → test Address 3

Hi, Never mind – I found it – looks like it is not there because
I changed from empty string to something - so old value is empty

1 Like

Right. If you only want changes, add a condition for changed rows only. You may want to know the initial value too, of course.

Hi Mark, one other problem I am running into. How can I add VendorID and Name to the email. only VendorNum is on the change log?

I tried to use fill table by query and populate Key 3 but was unable to.

So, this is my Data Directive:

You can see I’m grabbing the VendNum from the table:

then use that to get the Supplier Information

Set the remaining variables

Finally, use those for formatting the email.

1 Like

That makes sense, I was trying something similar, but forgot to change Key1 to integer.

I like the added steps too Thank you

1 Like

Hi Mark,

Now I am having another issue, I don’t know why but it seems to executing data directive for the change log only on the 2nd/3rd time a change is made to a particular supplier. The first change does not get emailed. I change the bank information on a supplier, and nothing shows up, I change it again, and subsequent times, I get an email.

Any ideas?

Wayne

I would create a BAQ that looks into the ChgLog and see what data is written as you make the changes. Make the first change, check the log. Make the 2nd change, check the log. Make sure there is data there.

What I’ve noticed is different. I get multiple emails and it gives an accumulated set of the changes for the day. The first change comes first. Then the second change email arrives but it also includes the first.

Hi, It was creating the change log, just the email wasn’t working. I change my condition from updated rows to all rows and that has worked.

I though updated rows meant added and/or changed, but apparently not..

Thanks again for all the help
Wayne

1 Like