Sorry, definitely my fault. Forget to post it..
I use the submit/code function with C#. I just tried to select the current ID (in which row the button is). Then I can call a WebService with this information.
With that I try to select a field called ID, which is part of the repeating table.
String x = e.Source.CreateNavigator().SelectSingleNode("/dfs:myFields/dfs:dataFields/dfs:RequestFL/@ID", NamespaceManager).Value;
However always the first occurrence of the ID field is selected. I tried about ~20 different ways.
With that code I just set the selected value to a textfield to check what was selected:
XPathNavigator xnDoc = this.MainDataSource.CreateNavigator();
xnDoc.SelectSingleNode("/my:myFields/my:CurrentItemID", ns).SetValue("The following error occurred:" +x+ "bla");
The WebService is definitely working. I managed to call it from Infopath. Here is an error message produced by SharePoint, due to that always the first occurence of the ID is selected.
Form
submission failed. (User: XXXXXXXXXXXXXX, Form Name: Cancel, IP: , Request: XXXXXXXXXXXXXXXXXXXXXX,
Form ID:
urn:schemas-microsoft-com:office:infopath:Cancel:-myXSD-2011-08-22T09-40-32,
Type: DataAdapterException, Exception Message: The remote server returned an
error: (500) Internal Server Error. Server was unable to process request.
---> The selected workflow 'XXXXXXXXXXX' is already running on list item
with id 76 in list 'RequestFL' on siteXXXXXXXXXXXXXXXXXXXXX.
The remote server returned an error: (500) Internal Server Error.) I apologize for not posting this essential information in my first post.