qRulesLink in Seperate Repeating Table - InfoPath Dev
in

InfoPath Dev

qRulesLink in Seperate Repeating Table

Last post 03-05-2013 12:35 PM by Mel Clemente. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-05-2013 05:34 AM

    • Bruce B
    • Not Ranked
      Male
    • Joined on 03-04-2013
    • Texas
    • Posts 1

    qRulesLink in Seperate Repeating Table

    My requirement is to prevent end-users from clicking the attachment field in an already populated repeating table row and overwriting already added attachments - it would be best to make it just dissappear after it saves the attachment to SharePoint and populates the qRulesLink field with the link to the file.

    I have a File Attachment field in a repeating table along with the qRulesLink field beside it in the same table.  I can add multiple attachments to my form using this repeating table.  When I use the SubmitToSharePointList command, it saves the attachments to a SharePoint library and adds the links to the attachments in the qRulesLink field.

    However after I submit the form, the (seemingly empty) attachment field still appears there beside the qRulesLink field.  If someone clicks on it and adds another attachment, it changes the link in that row when it's saved again, overwriting the previous attachment link.

    Is there a way to populate the links (qRulesLink) to attachments in a separate repeating field?

    Or...

    Is there a way to make the attachments field disappear from the row once a qRulesLink is populated within the same row (but still have the ability to add additional attachment rows)?

    Thanks!        

    Bruce B

    Bruce Burns
  • 03-05-2013 12:19 PM In reply to

    Re: qRulesLink in Seperate Repeating Table

    Hi Bruce,

    Here is one idea: add another attribute to your file attachment field called IsLocked (true/false data type, default value = false), and then as part of your submit setup add a rule that sets IsLocked = true for all rows in your repeating table.  Then, set a formatting rule on the attachment field to disable the control if IsLocked = true.  This won't remove the attachment fields, but it will disable them so they can't be clicked.  Alternately, you can set the formatting rule to hide if IsLocked = true, which will hide the attachment field completely once you have submitted.  If you hide or disable on submit, then the user can go back and change attachments before submitting, instead of having to delete a row and add a new one if they happen to select the wrong attachment.

    Jennifer Lindsay
    Qdabra® Software/InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

  • 03-05-2013 12:35 PM In reply to

    Re: qRulesLink in Seperate Repeating Table

    Hi - the second option is the easier approach so I'll respond to that. You'd want to place the attachment control inside a section so that you can add a conditional formatting to hide it if qRulesLink is not blank; something like this:

     

    Here's a sample result:

    I attached a sample form if that helps.

    Mel Clemente
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

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