Pages

Tuesday, 9 July 2013

InfoPath attachment Field Read Only-Resolved-No Code

we adopted a very simple approach without any code, we created two attachment field and put each of them in separate section wherein 2nd attachment field we uncheck the properties say "allow the user to browse, delete......." option and set the rule on 1st attachment field that as we upload the file in first attach. field it will set the same file to second attach. field...which is hidden on first time based on HIDE filed and will show on file upload in 1st attachment which hide the 1st attachment make illusion that the file converts to read only....
 
Please Follow the steps below how to accomplish this task...
Create new InfoPath and create two sections within it create attachment field respectively as shown below:
 
 
Right Click on second attachment field and uncheck the allow the user... checkbox
 
 
create rules on field 1 shown below:

 
Rule 2:
 
 
Create rule on Section 1:

 
Create rule on Section 2

 
 
Happy Sharepointing...Have a Nyc Day..:p

7 comments:

  1. Hello Mohit,

    I want to thank you for the effort and time you dedicated in documenting these business automation processes using Infopath 2010. However, I have followed the screen shot of InfoPath attachment Field Read Only-Resolved-No Code but its not working.

    Please, do I have to give a default value for the hide control. Please, could you give a detailed step on how to achieve this.

    Thanks once again,


    BR,
    Emeka

    ReplyDelete
    Replies
    1. Thanks mekus pokus,

      To make attachment field read only, there is no 1 or 2 clicks or out of the box procedure we have to do certain changes in order to make it read only. We developers have to accomplish the task by any reason without user experience sacrificed.

      Yes, you have to give default value as 0 to hide field , I have mentioned the same in my first screenshot on right hand side, you can check for reference.

      "I have also implemented this to a great extend and applied approval workflow and on the basis of approval decision it becomes read only or editable and also only current user can only edit their own attachments not other..". I will be explaining the procedure on my upcoming post. so, stay connected!!.

      I hope it helps, else you can send your InfoPath on my mail mentioned below and I will resolve it for you.

      Happy Sharepointing...Have a Nice Day...

      Regards
      Mohit Jain
      wisemohitjain@gmail.com

      Delete
    2. Hello Mohit,

      May I say that you are the first Infopath/SharePoint guru I am contacting online. I would especially want to thank you for your timely response.

      I am a beginner in InfoPath 2010 and also learning how to implement workflows too. I work as a Support Analyst. Please, kindly check your mail for the attached my InfoPath form and though it has worked. I also tried using a repeating section using the same rules and it gave me a bit challenge, please I have sent it as an attachment to correct me. I would be glad to be your student Professor Mohit.

      Looking forward to your article on approval workflow for read only and editable on attachment control and subsequent articles.

      Once again thanks for your effort.

      Delete
  2. Hello Mohit,

    Hope your doing good? How is work going too. Please, could you correct my InfoPath form on InfoPath attachment Field ReadOnly on a repeating section. I have sent it to your mail as an attachment.

    Thank you for taking your time to document these solutions.

    Best regards,
    Nnaemeka Nebechi

    ReplyDelete
  3. Amazing sollution! I couldn't stop loughing representing it in my form. Thank YOU!!!

    ReplyDelete
    Replies
    1. Glad it helps, and yes it is a funny solution. It is no-code and totally OOTB solution,..happy sharepointing...have a nyc day..:p

      Delete
  4. Hi,
    How can i implement the same for Multiple attachments? I am not able to see all the attachments in second read only field.

    ReplyDelete