locked
How to see in my view if an uploaded InfoPath form has attachments RRS feed

  • Question

  • Hello everyone, thank you in advance for your time.

    I have an InfoPath form that is used to add to a document library in SharePoint 2010. This form will allow you to add attachments to the document if you want with the file attachment tool via InfoPath 2010. The attachments are embedded to the form and not uploaded to another library.

    My question is how can I display in my view that a particular document has attachments?? I just want the user to be able to see when they look at the list if an uploaded document has files attached to it. I am not for sure if there was an easy answer or if its going to need special coding.

    I am new to both SharePoint and Infopath so forgive me if I haven't posted needed information that may help.

    Thank you

    Tuesday, September 13, 2011 8:16 PM

Answers

  • No coding required here.  What you can do is add a new field to your main datasource.  Call it something along the lines of Attachments; set the default value to "No".  Now, you need to add two rules to the attachment field in your form:

    Rule1
    Condition:  If attachment field is not blank
    Action:  Set a field's value:  Set Attachments to Yes

    Rule2
    Condition:  If attachment field is blank
    Action:  Set a field's value:  Set Attachments to No

    Republish your form - and during the publishing wizard in the property promotion step select the new Attachments fields to be promoted.  Then when it's done publishing add the column to your library view.

    • Marked as answer by pdoyle1521 Wednesday, September 14, 2011 7:44 PM
    Wednesday, September 14, 2011 5:05 PM

All replies

  • No coding required here.  What you can do is add a new field to your main datasource.  Call it something along the lines of Attachments; set the default value to "No".  Now, you need to add two rules to the attachment field in your form:

    Rule1
    Condition:  If attachment field is not blank
    Action:  Set a field's value:  Set Attachments to Yes

    Rule2
    Condition:  If attachment field is blank
    Action:  Set a field's value:  Set Attachments to No

    Republish your form - and during the publishing wizard in the property promotion step select the new Attachments fields to be promoted.  Then when it's done publishing add the column to your library view.

    • Marked as answer by pdoyle1521 Wednesday, September 14, 2011 7:44 PM
    Wednesday, September 14, 2011 5:05 PM
  • Thank you Melissa, that worked perfectly. You are a life saver.
    Wednesday, September 14, 2011 7:44 PM