IP rules to change batch node fields - InfoPath Dev
in

InfoPath Dev

IP rules to change batch node fields

Last post 12-16-2014 02:11 PM by Hilary Stoupa. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-16-2014 02:06 PM

    IP rules to change batch node fields

    Hi all,

           I've read quite a few posts on here that are very similar to what I need, but they happen to be just different enough where I need to create this question. 

     I'm using IP 2010 to create a 2007 browser form.  There's very few fields in the form, and I want to use it to submit new items to a SharePoint 2007 calendar list.  I created my Add List Item template for the Calendar List as follows:

    <?xml version="1.0" encoding="UTF-8"?>
    <Batch OnError="Continue">
        <Method ID="1" Cmd="New">
            <Field Name='Title'></Field>
            <Field Name="Location"></Field>
            <Field Name="Start Time"></Field>
            <Field Name="End Time"></Field>
            <Field Name="AgreementID"></Field>
            <Field Name="Description"></Field>
            <Field Name="Business Division"></Field>
            <Field Name="RABU"></Field>
            <Field Name="RRA Hyperlink"></Field>
            <Field Name="Status"></Field>
        </Method>
    </Batch>

    I have a webservice submit connection using the UpdateListItems method, I have the Calendar List GUID as a field in the form and it's connected to the webservice connection.  All seems fine, I've added a button with rules to set the @Name field in /Batch to various corresponding text fields in my form.  I then exported and modified my manifest file and changed each of the 'Set a Field's Value' actions to specify the particular field.  It now looks like this:

       <xsf:rule caption="Set Values for XML Nodes">
        <xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;Add List Item Template&quot;)/Batch/Method/Field/[@Name = 'AgreementID']" expression="my:section_rra_details/my:ddl_agreementid"></xsf:assignmentAction>
        <xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;Add List Item Template&quot;)/Batch/Method/Field/[@Name = 'Location']" expression="my:section_rra_details/my:txt_agreement_name"></xsf:assignmentAction>
        <xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;Add List Item Template&quot;)/Batch/Method/Field/[@Name = 'Business Division']" expression="my:section_rra_details/my:txt_business_division"></xsf:assignmentAction>

     

    When I open the form back up and inspect the rule it looks like this for each of the fields:

    xdXDocument:GetDOM("Add List Item Template")/Batch/Method/Field/[@Name = 'AgreementID']

    I was expecting it to look more like: /Batch/Method/Field/[@Name = 'AgreementID']

     When I submit the form, it tells me that rules weren't applied and doesn't submit anything.

    I think I'm missing something simple somewhere in the process.  I'm not using a repeating table, just item at a time.  My objective is to use the CAML to add a new item to the list upon submit, so I need to set each field in my batch file @Name to the correct text field on the form. 

     If that makes sense, I'm sure you guys can help,

    Thank you

     

  • 12-16-2014 02:11 PM In reply to

    Re: IP rules to change batch node fields

    xsf:assignmentAction targetField="xdXDocument:GetDOM(&quot;Add List Item Template&quot;)/Batch/Method/Field[@Name = 'AgreementID']"

    You have a "/" between Field and [ that needs to be removed. Give that a try. :)

    Hilary Stoupa

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