How to indicate a file has been attached using the Attach File control - InfoPath Dev
in

InfoPath Dev

How to indicate a file has been attached using the Attach File control

Last post 05-08-2009 11:06 AM by NancyCentury. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-08-2009 10:21 AM

    How to indicate a file has been attached using the Attach File control

    My InfoPath form publishes to a Form Library in SharePoint and contains an "attach file" control. If a user attaches a file, I want the form library to display yes or no as a text value that can be promoted to the form library so that users will be able to see if one of the submitted forms includes an attached file or not.

    I created a text control that defaults to NO. What I want to occur is: If a file is attached, change the value in this field to YES. (The field is hidden from users via conditional formatting.)

    The issue is - I don't know how to set the condition to change the value to YES.

    I tried "If [attach file] is not blank, change value to YES" thinking this was the correct way to verify the condition. But that did not work!!

    Which option in Conditions will give me the right result? How does the form "know" that a file was attached? The blank/not blank and present/not present options do not seem to pass the right result.

     OR- if there is a better way to allow me to promote to SarePoint the fact that a file was attached, let me know!

    Thanks!

  • 05-08-2009 10:45 AM In reply to

    Re: How to indicate a file has been attached using the Attach File control

    Actually, checking for blank/not blank should do the trick (I just tried it).  The rule should be specified on the file attachment's field, not on the field you're trying to set.  Could that possibly be where you're going wrong?

    Also, please make sure that a formula for the default value of your yes/no field isn't conflicting with the rule.

    Jimmy Rishe / Software Developer / Microsoft MVP
    Qdabra Software
  • 05-08-2009 10:58 AM In reply to

    Re: How to indicate a file has been attached using the Attach File control

    I will make sure I am setting it on the right field- thanks!

  • 05-08-2009 11:06 AM In reply to

    Re: How to indicate a file has been attached using the Attach File control

    It worked- thanks!

    Also one mopre question. Are there hard size limits (or recommended limits) for files attached to forms using this control? Will the attachments affect the overall form library size limit?

Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.