Conditional formatting of Repeatable Section - InfoPath Dev
in

InfoPath Dev

Conditional formatting of Repeatable Section

Last post 09-04-2013 05:24 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-19-2013 09:37 PM

    Conditional formatting of Repeatable Section

    Good day!

    I need to make history of decisions with repeatable section, which contains users decisions. I made it with web-service, which enter data into database, then extract it on form open. The problem is display data from web-service when document has more than one root. For example, document has 3 Roots in GroupRoot and web service returns xml with 3 sections. I made a conditional formatting on repeatable section from web-service secondary datasource - hide if field not equal field and as a result nothing is dispayed. After I tried to to use jscript method in conditional formatting on the same datasource. Every Root called method 3 times and only first decision displayed in every Root, but it must be dispayed only in first Root.

    I used to call method like this - "xdExtension:CheckRequestNum(string(RequestNum)) = false()". Can someone tell me how can I get current Root node? Or how can I make it without updating template scheme?

    Method code:

    function CheckRequestNum(ReqNum)
    {
     debugger;
     var node = null;
     var nodes = XDocument.DOM.selectNodes("/GroupRoot/Root");
     //var RequestNum = XDocument.DOM.selectSingleNode("Root/Request/RequestNum").text;
     //if (ReqNum == RequestNum) return true;
     //else return false;
     while (node = nodes.nextNode())
     {
      var RequestNum = node.selectSingleNode("Request/RequestNum").text;
      if (ReqNum == RequestNum) return true;
      else return false;
     }
    }

  • 09-04-2013 05:24 PM In reply to

    Re: Conditional formatting of Repeatable Section

     Hi - I'm sorry, but I am having trouble understanding what you are trying to do and what the issue is.... if you are still having trouble, can you attach a sample form under the options tab that shows the issue?

    Hilary Stoupa

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