XML Data Source - No fields available...

O

Olav K. Aukan

Hi!

I was following this tutorial:
http://blogs.msdn.com/infopath/archive/2007/03/26/submitting-to-a-sharepoint-list.aspx

It show how to use the Lists webservice in SharePoint to add items to a
list, by adding the batch xml file as a data source in InfoPath.

I decided to expand on it by making it also update an existing item. For
that I need the ID of that item to be in the batch xml I send to the
webservice. My xml looks slike this:

<?xml version="1.0" encoding="UTF-8"?>
<Batch OnError="Continue">
<Method ID="1" Cmd="Update">
<Field Name='ID'></Field>
<Field Name='Title'></Field>
<Field Name="Prosjektnummer"></Field>
<Field Name="Prosjektmal"></Field>
<Field Name="Prosjektleder"></Field>
<Field Name="Status"></Field>
<Field Name="Disiplin"></Field>
<Field Name="Kunde"></Field>
<Field Name="Installasjon"></Field>
<Field Name="Kontaktperson"></Field>
<Field Name="Produkt"></Field>
<Field Name="Avsluttet"></Field>
</Method>
</Batch>

This xml is then used to make a table with text boxes so the user can fill
in the metadata and push update, but I want to fill in the first one (ID)
automatically, as I already know the ID of the item he is trying to edit.

However, when I was creating an action to copy this ID to the appropriate
text box I noticed that none of the fields defined in the xml are available
when I drill down to Fields in the data source. There is only one field,
"Name", and changing that changes the entire column of values. Is there
really no way for Infopath to allow me to address a field in a repeating
table generated from a xml data source? It seems so ridiculous to me... I
define all the fields for it in the xml, and then it won't let me do anything
with them...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top