Problem setting field values with filter - InfoPath Dev
in

InfoPath Dev

Problem setting field values with filter

Last post 08-08-2010 10:05 AM by SteveJones. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 08-07-2010 11:19 AM

    Problem setting field values with filter

    I can't get a filter to work when saving form data to the xml. My xml contains these nodes:

    <my:myFields>
      <my:CurrentID />
      <my:Action />
     ...
      <my:DocOwners>
        <my:DocOwner> (this is a repeating node)
          <my:DocOwnerID />
          <my:DocOwnerAction />
     ...
        </my:DocOwner>
      </my:DocOwners>
     ...
    </my:myFields>

    DocOwner has two rows, and DocOwnerID is populated with two different user IDs. These two people receive an email note with a link to the document. When they open the form, a web service populates CurrentID with their user ID from Active Directory. Action is a dropdown list and they have to select a value prior to clicking the submit button.

    There is a rule set on the Submit button that says to set the DocOwnerAction Field from the Action Field with the rule [DocOwnerID = CurrentID]. The second rule submits the form to a Sharepoint Form Library. But upon execution by the first person it sets both DocOwnerAction fields, and then upon execution by the second person it sets both DocOwnerAction fields to the new value.

    Any ideas?

    Steve
  • 08-08-2010 10:05 AM In reply to

    Re: Problem setting field values with filter

    I have managed to bypass this issue by writing code behind to accomplish this task. I loop thru the DocOwner nodes to find the one with the ID that matches, then I set the other childnodes as required. I was hoping to avoid code in the form, but it seems unavoidable. Is there a way to select the proper DocOwner node without looping thru them? something like ' dest = ...selectSingleNode("../my:DocOwner[CurrentID]")?

    I guess the way the filters were designed to work was to set a value of a non-repeating node from a value in a repeating node (filtered), but I am trying to do the reverse.

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