Rule for calculated field - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Rule for calculated field

Last post 07-27-2018 08:49 AM by jd422. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 07-24-2018 11:43 AM

    • jd422
    • Not Ranked
      Male
    • Joined on 07-22-2010
    • Pennsylvania, USA
    • Posts 6

    Rule for calculated field

    If I have a repeating section that has a calculated field and a data field, can I have a rule for the calculated field to hide it based on the value of the data field in the same section.

    Example xpath of the data field inside the repeating section:   /my:myFields/my:group1/my:HistoryItems/my:HistNewRisk

     I don't want the rule to hide the calculated field on all sections just because the rule is valid for the data on a different section.

     If it is possible, please advise. 

  • 07-27-2018 08:10 AM In reply to

    Re: Rule for calculated field

    So - the calculated field is in the HistoryItems? Can you attach your template under the Options tab in a reply so I can see what you are trying?
    Hilary Stoupa

  • 07-27-2018 08:49 AM In reply to

    • jd422
    • Not Ranked
      Male
    • Joined on 07-22-2010
    • Pennsylvania, USA
    • Posts 6

    Re: Rule for calculated field

     LOL.  It is working now.  I must have had some very minor typo or something.  After looking at the XSL file associated with the manifest file, I suspected that it should work.

    The data field is in the HistoryItems node (the repeating node/section) in the XDocument.DOM.  The rule's context is the repeating node and therefore it works as I wanted it.  I might say that a person could edit the rule and reference any of the sibling nodes and do something a lot more sophisticated.

     Thank you for the reply.

     P.S. My apologies for the following rather verbose commentary:

    I am especially enjoying working with my InfoPath form.  I am using more than 1500 lines of vbScript to manipulate the data and behavior of the work flow.

    My form is a request for a new item in our content management system with a workflow that goes from the requestor to Admin and two more levels of approval.  It can be rejected at any point in the workflow and go back to the requestor to be restarted.

    I use a couple of SharePoint lists for setting some form behavioral parameters and names of approvers and also for some dropdown lists.

    By way of the underlying vbScript, the form can be moved/republished at either of two SharePoint libraries (development or production) and the form will automatically know which site it comes from and perform the Save, Email and other such tasks in different ways.

    I can open it from the development site or from locally saved exported files (manifest.xsf, template.xml, vbscript.vbs, etc.) for testing and then republish it to the production site when development is complete. 

    Thank you, again.

    Regards, Jim

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