in

InfoPath Dev

Filter with Data Connection data, with c# or else

Last post 06-25-2008 07:47 AM by Shiva. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 06-10-2008 08:10 AM

    Filter with Data Connection data, with c# or else

    Hi,

    I got a probleme related to DataSources and arepeating Table.

    In one hand, I got a Secondary DataSources with Repeating data (imported from a SharePoint Library) which contains a list of non-worked days. string

    In the other hand, I have a repeating Table with a DateField. I create this dynamic repeating Table which represents a month,  with xCollection.

    All I want is if both of the dates match, to set an other field of the collection as 'nonworked'. (I extract the substring from the date without year)

     

    First, I tried with rules on the insert event but this doesnt work at all.

    I'm using c#, and I think this could be done using last() after xCollectionInsert as I already set sunday over for example. 

    But I don't know how to get the date from the second datasource properly with code and make the filter. I'm a newbie with xml and iterator and so more freaking stuff.

    Can anyone help me to find how to do that,

    Regards

     

  • 06-25-2008 07:47 AM In reply to

    • Shiva
    • Top 10 Contributor
    • Joined on 04-15-2005
    • India
    • Posts 602

    Re: Filter with Data Connection data, with c# or else

    Hello,

    To get the secondary dom node value using below the code,

    IXMLDOMNode dateNode = XDocument.GetDOM(“Secondary DOM Name”).selectSingleNode(“XPath of the field”);Example: XPath of the field is: /SecondaryRootNode/Dates/Date[last()]

     

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