Hi,
I have a SharePoint 2013 list that houses our training enquiries. Each item in the list is an individual student. Amongst other columns, there is a part number constructed from the student's region and department. There can be up to 6 students on each class, these are linked by a unique reference number.
I am trying to create an InfoPath 2010 form to use as a Purchase Requisition. I have a field where the reference number is typed in, then a button which is clicked. Rules on the button set a query field and then query the data source. This populates a repeating table that is bound to the SharePoint list with one line for each student.
My problem is that all 6 of these students might have the same part number. In that case I would want only 1 line in my table with a quantity of 6. Or there might be 3 with one part number and 3 with another part number. In which case I want to see 2 lines, each with a quantity of 3.
Using 'preceding' to filter the data I can get it to show the first item and count for that item but I cannot get it to show the remaining items - the repeating table only has one line.
XPath is as follows:
To get part number: = pART_x0020_NUMBER[not(. = preceding::SharePointListItem_RW/pART_x0020_NUMBER)]
To get count: count(pART_x0020_NUMBER[not(. = preceding::SharePointListItem_RW/pART_x0020_NUMBER)])
I have searched and searched for an answer but nothing seems to work. I don't understand what the preceding function is doing so I don't know if it is really the right thing, but it seemed to feature in a lot of the posts I found.
I am not allowed to use code and have very little IS support when it comes to InfoPath. Any help would be gratefully received, I am starting to think this is too complex a requirement for InfoPath.
Thanks in advance,
Jayne