How to apply a user / date/time stamp ID to a text box

Epicor 9.05.701

The below field is RMAHead.Character01

How can i add a User, Date, and Time stamp to that field everytime somebody posts comments?

Pre-proessing BPM should take care of it, before Update
Set Character01 = Character01 + callContextClient.userID + NOW()

Looks like you are in 9 that’s not the exact syntax it would be in ABL, but that’s the gist of it. If you need the exact syntax let me know

2 Likes

Hi Jose,
Your right, were using 9.05.701…if you could provide the ABL syntax that would be fab.

thank you so much

This should get you close.

Greg

Assign ttRMAHead.Character01 = ttRMAHead.Character01 + " " + ttCallContextClient.CurrentUserId + " " + string(Month(Today),“99” ) + “/” + String( Day(Today),“99”) + “/” + substring(String(Year(Today),“9999”),3,2) + “~n”.

Hi Greg,

I changed your syntax by swapping the word Day and Month around (as i’m based in the UK)…but it didn’t seem to like it, nothing happened.

Sorry, that still needs to be wrapped in a for each ttRMAHead end clause

Greg

/* assign char 01*/

For each ttRMAHead.

		Assign ttRMAHead.Character01 = ttRMAHead.Character01 + " " + ttCallContextClient.CurrentUserId + " " + string(Month(Today),"99" ) + "/" + String( Day(Today),"99") + "/" + substring(String(Year(Today),"9999"),3,2) + "~n".

End.

Hi Greg, - thanks for your help, its really close now…

Here is how i’d like it to work:
manager 21/05/2017 + time: hi, this is a test
manager 21/05/2017 + time: yes, a test
MR1109 21/05/2017 + time: ok, no problem

Here is the code i’ve used:
/* assign char 01*/

For each ttRMAHead.

	Assign ttRMAHead.Character01 =  " " + ttCallContextClient.CurrentUserId + " " + string(Day(Today),"99" ) + "/" + String( Month(Today),"99") + "/" + substring(String(Year(Today),"9999"),3,2) + ": " + ttRMAHead.Character01 + "~n".

End.

Here is how it is looking:

String (time,“HH:MM:SS”) will get you the time.

What I would probably do to make the prefixing of the entry work is to use another character field for them to enter the comment and then build character01 into the log and clear the entry field.Then users can’t mess up the entries. You could even make the field read only with a customization.
I would also build this in reverse order, so latest comments are on top. Put the ~n at the end of each new entry before ttRMAHead.Character01 and the comments will all start on a new line.

Greg

Hi Greg, i agree totally with your thoughts - that would be far better practice.
The only small problem i have now with the current setup is that every time i click save (even if i’m not working on that field) it returns the User/Date/Time…i only really need to see that when a comment is added

/* assign char 01*/
For each ttRMAHead.
Assign ttRMAHead.Character01 = “~n” + ttCallContextClient.CurrentUserId + ", " + string(Day(Today),“99” )

  • “/” + String( Month(Today),“99”) + “/” + substring(String(Year(Today),“9999”),3,2) + ", " + String (time,“HH:MM:SS”)
  • ": " + ttRMAHead.Character01 .
    End.

Thanks.
Mark

Set your condition to ttRMAHead.Character01 is changed from any to any.

2 Likes

Set the condition on the input field has been changed from any to any.

IE

the ttRMAHead.Character02 has been changed from any to any

Then use Character02 in the assignment and clear it.

/* assign char 01*/

For each ttRMAHead.

     Assign ttRMAHead.Character01 =  "~n" + ttCallContextClient.CurrentUserId + ", " + string(Day(Today),"99" )

· “/” + String( Month(Today),“99”) + “/” + substring(String(Year(Today),“9999”),3,2) + ", " + String (time,“HH:MM:SS”)
· ": " + ttRMAHead.Character02 + ttRMAHead.Character01 .

Assign ttRMAHead.Character02 = ‘’.

· End.

1 Like