Jump to content
  • 0

Need help in trigger


bookish

Question

Hi everyone, this issue is quite new to my newbie programmer mind.
I need to know when the fields related to payment are updated (UPDATE4FAO), but not when non-payment fields are updated.
My formula works only for the first time that a date of payment is updated. But after than since the condition is already met, the update field is updated too. 
P.S. Please don't mind the concatenation for date. In the real table I have a date/field field for UpdatePayment field.
image.thumb.png.bad6269382730c1286d695f17c4dda17.png

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Hello @bookish,

As far as I understood you need to stamp the time when the specific field is updated.

The basic approach to track the changes is:

1) To join the Table and the #inserted table on the unique field.
This is needed to identify the record that is being updated.

2) To compare the previous value and the new(updated) value. If they are not equal, this means that the value was updated.

For example, the 'Update_Date' field will be updated when the 'Name' field is changed. 

wSt5k1A.png

 

Could you clarify this part 'but not when non-payment fields are updated'?

In my understanding, the field you are interested in can be updated along with the other fields. So, if you only need to track the change in the specific field regardless of the other fields, the example on the screenshot should work.

Feel free to ask questions if you need further assistance on this. 

Link to comment
Share on other sites

  • 0

Thank you @CoopperBackpack.

It seems logical but it did not work, unfortunately. I put a date in DateField an d there was no date/time that appeared in the field Update4FAO.

Regarding "but not when non-payment fields are updated'" I am referring to the same record. Day 1, in that record, the field DatePaid was updated, Day 2 the re was an update in the same record for contact number. In my initial screenshot, the field Update4FAO was updated in Day 1. But in Day2 it was also updated. I only wanted the field Update4FAO to be updated when there is a change in DatePaid.

Link to comment
Share on other sites

  • 0

Hello @bookish, it is good to know that it works. I think I didn`t get all the details to understand the workflow. 
The main thing is to understand how to identify the updated record (join the tables on a unique field) and to compare the old and the new values. So, it is important to understand which values should be compared. 

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...