As I am adding suites of applications for new use cases, that may interact with tables created for our original application suite / use case, I am thinking I would like my record IDs to be a little more descriptive than what we started with.
Our original app created a Session ID via App Start trigger as follows:
We have a similar format for Table Record IDs generated via the app:
The Session ID is written into every table record created during the app session, and facilitates grouping records for subsequent analysis.
(I am also looking at how we can use this (maybe in another table column) to reflect the Session ID for the most recent record update, or even as an inelegant audit trail field wherein the Session ID for every subsequent edit is appended to a delimited string.)
I created the following to enhance the above by getting the text format in such a way that it is alphanumerically sortable and also indicates the app.
The expression is as follows:
datetimetotext(@App Info.Current Date and Time , ‘YYYY[m]MM[d]DD[t]HH:mm:ss.SSSZZ’) + ’ - ’ + @App Info.Logged-in User.Name + ’ - ’ + @App Info.App Name + ’ - ’ + @App Info.App Version
Based on the way we deploy apps, I’m thinking I can lose the App Version part.
However, when troubleshooting this ID formatting via button trigger, I noticed that even with the SSS milliseconds formatting enabled, no matter how many times I clicked the button as fast as I could, I could only see whole second intervals in the timestamp.
This is a concern to me for one of our new use cases wherein we care using Device triggers to capture torque analyzer output. It is possible that we could get two device outputs during the same 1000 milliseconds, which would prevent the second output from being recorded due to the Table Record ID being the same (I wouldn’t want to overwrite the first one either).
Is there a way to enable milliseconds time? We are running LTS 8.2, currently.