InfoPath 2013 SP'13 form - InfoPath Dev
in

InfoPath Dev

InfoPath 2013 SP'13 form

Last post 11-03-2016 12:00 PM by Hilary Stoupa. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 11-03-2016 10:47 AM

    • Wendie1970
    • Not Ranked
      Female
    • Joined on 02-10-2015
    • Fort Worth, TX
    • Posts 5

    InfoPath 2013 SP'13 form

    Hi all,

    Have tried just about every variation of Google search that I could come up with, but no joy so I decided to present the question to you fine folks:

    Is there a way in a InfoPath 2013 browser form to have a rule dynamically detect if a field name begins with a specific text (example "txtFld"). None of the fields are in a repeating table. 

    Here is the scenario:

    If the user changes field "ReqScreen" = 23 

    then set field names starting with ("txtFld") = ""

    I can do this type of action all day long in VBA, but am stumped as to how to make it work in InfoPath browser form where VBA is not an option.  I am hoping that this is possible, because if not, then I will have to program a rule to set field = "" for 20 different fields.


     

  • 11-03-2016 11:12 AM In reply to

    Re: InfoPath 2013 SP'13 form

    You can have code in a browser form still - as long as this is not Office 365 or you haven't moved to SharePoint 2013. But it wouldn't be worth it for this - it would be better to just write the rule to set all 20 fields. You can also do this with a manual modification to the form's manifest file to add an XPath filter to the field you are going to set - I tend to be leery of manual mods to browser forms, tho, as sometimes they cause more issues than they are worth. But let me know if you want more info.
    Hilary Stoupa

  • 11-03-2016 11:52 AM In reply to

    • Wendie1970
    • Not Ranked
      Female
    • Joined on 02-10-2015
    • Fort Worth, TX
    • Posts 5

    Re: InfoPath 2013 SP'13 form

     Thank Hillary -

    That is what I was afraid of. And we have moved to SharePoint 2013.  If I was to try the modification to the forms manifest, what would it need to look like? Can you point me in the direction I need to go to explore that option?  I am not afraid to try something, but I take your point that sometimes you just have to play by the rules. I am just worried that having 20 + actions will my form sluggish. I have also thought about trying to convert it somehow into something more developer friendly.

  • 11-03-2016 12:00 PM In reply to

    Re: InfoPath 2013 SP'13 form

     I don't think you are going to make your form slower with that many actions - after all, all the same fields will be set regardless. Here is a link to a blog post on this (for repeating fields, but the idea is similar): http://www.infopathdev.com/blogs/hilary/archive/2009/06/07/hack-manifest-xsf-to-filter-the-target-of-a-rule.aspx

    I think you'd combine the local-name function with the starts-with function to create an XPath filter to target just the nodes you want. 

    Hilary Stoupa

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