Attachments

rss

Posted by schuess - Feb 26 ’14 at 05:17

Is there any way to interact with with attachments field.

 

For example

can you check if the attachments fields is null?

can you read the file name of the attachment?

can you prevent the attachments from disappearing when someone fails a field requirement?

 

just wondering.

 

thanks

matt

 

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 26 days
    #1 by Dmitry Kozlov Feb 27 ’14 at 04:21

    Yes, you can control the Attachments field via JavaScript.

    can you check if the attachments fields is null?
    Yes, you can retrieve the attachments table and check whether it contains rows or not via JavaScript

    can you read the file name of the attachment?
    Yes

    can you prevent the attachments from disappearing when someone fails a field requirement?
    Unfortunately, not. Files are lost after postback if they were not loaded to the server.

  • hp
    Member
    Member for: 4 years 9 months 6 days
    #2 by hp Jan 16 ’15 at 01:31

    How do you read the attachment file name i am trying to send a link to attachment directly in task. thanks in advance!

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 5 years 10 months 26 days
    #3 by Dmitry Kozlov Jan 20 ’15 at 09:25

    [#2]: Please, use the code below:

    //first attachment
    var filename1 = $('#idAttachmentsTable tr td.ms-vb').eq(0).text();
    
    //second attachment
    var filename2 = $('#idAttachmentsTable tr td.ms-vb').eq(1).text();
    
  • hp
    Member
    Member for: 4 years 9 months 6 days
    #4 by hp Sep 14 ’15 at 09:47

    Thanks this worked perfectly!

Displaying 1 to 4 of 4 messages