Adding Date and Time in Manage Attachment ?

Ibaa_Shoheb
Tera Contributor

Hello Team,

At the moment, we do not have an option in “Managed Attachments” to identify the timing as to when we received an attachment in our environment.

Is it possible to have the arrival time stamp appended to the Attachment file name ? 

find_real_file.png

Regards,

Shoheb Shaikh

14 REPLIES 14

Craig_C
Tera Contributor

In case this is helpful for future readers:
The scrip snippet from davo does work for newly added attachments. Just that you won't see the  date/timestamp until you reload the form (i.e. incident) and re-open Manage Attachments view.

Hi Davo, if I'm following this then it's working for all the out-of-the-box tables like change, problem, incident etc. Can I restrict it to my custom table?

Not something I have looked at potentially you could do something similar to this in the UI Macro (not tested):

 

    <j:otherwise>
          <a class="attachment view_${sys_attachment.sys_id}" click-on-enter="true" href="javascript&colon;void(0)" onclick="tearOffAttachment('${sys_attachment.sys_id}');" aria-label="${HTML:jvar_attachment_aria_label}">
           ${jvar_attachment_action_title}
   <script>

var recordClass = current.getRecordClassName();
if(recordClass == <your_custom_table_name>) {

//add Created date to layout

${HTML:sys_attachment.sys_created_on.getDisplayValue()}
}

</script>
  </a>

 

It didn't work as the form is not adding the attachments when using this script. Besides, do you have any idea in same dialog box beside timestamp can we add the state at which it is uploaded. for example - If I have attached a file named 'test.txt' on 'In Progress' state of Incident so when I click on Manage Attachments I will be able to see file name and beside it In Progress(state name on which the file is added)

TABh
Giga Contributor

How to provide Date/Time stamp in Attachment in SOW not in Manage attachment.