Message search - Time Format
Hello guys,
One thing keeps annoying me and I'm pretty sure it does many other people (my workmates as well, lol): every time I access the 'Message Viewer' screen, the 'Time Format' come with 'Time only' as a default. Can I make 'Complete' as the default value for it?
Thanks!
Inherit from EnsPortal.MessageViewerCopy searchPane from EnsPortal.Template.filteredViewerIn searchPane, TimeFormat node replace attribute value="12" with value="999"Compile. Your new class would have Complete as TimeFormat default valueAlternatively, instead of 2-4 you can set TimeFormat value in your class by overriding some init callback ( %OnAfterCreatePage maybe, don't forget to call ##super() though) and setting it there. It would be a better solution.2020 UPDATE.
I think I found a better solution.
1. Extend EnsPortal.MsgFilter.Assistant class.
2. In this class redefine EnumerateExecute method to provide the desired format. Replace this line:
Do ..addTerm(.aSelect,"{fn RIGHT(%EXTERNAL(head.TimeCreated),"_dateLen_" )} As TimeCreated")
to provide the format you need.
Alternatively redefine OnFinalizeSQL to replace
{fn RIGHT(%EXTERNAL(head.TimeCreated),999)}
with something else.
3. Set the global
^EnsPortal.Settings("MessageViewer","AssistantClass")
to the value of your class.
This looks like an official way to modify MessageViewer behavior.
Thanks , mate