Hello all,
I have a repeating table and the table contains a sub repeating group. User can filter the table by textfields using for filterss.
My xml structure ist following:
<my:myFields xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-11-03T09-00-35">
<my:Recipe>
<my:RecipeName>Name1</my:RecipeName>
<my:ParameterSection>
<my:Parameter>
<my:PName>P1</my:PName>
<my:EIName>Ei1</my:EIName>
</my:Parameter>
<my:Parameter>
<my:PName>P2</my:PName>
<my:EIName>Ei2</my:EIName>
</my:Parameter>
<my:Parameter>
<my:PName>P3</my:PName>
<my:EIName>Ei3</my:EIName>
</my:Parameter>
</my:ParameterSection>
</my:Recipe>
<my:Recipe>
<my:RecipeName>Name2</my:RecipeName>
<my:ParameterSection>
<my:Parameter>
<my:PName>P1</my:PName>
<my:EIName>Ei1</my:EIName>
</my:Parameter>
<my:Parameter>
<my:PName>P2</my:PName>
<my:EIName>Ei2</my:EIName>
</my:Parameter>
<my:Parameter>
<my:PName>P3</my:PName>
<my:EIName>Ei3</my:EIName>
</my:Parameter>
</my:ParameterSection>
</my:Recipe>
<my:Recipe>
<my:RecipeName>Name3</my:RecipeName>
<my:ParameterSection>
<my:RecipeParameter>
<my:PName>a</my:PName>
<my:EIName/>
</my:RecipeParameter>
<my:RecipeParameter>
<my:PName>b</my:PName>
<my:EIName/>
</my:RecipeParameter>
<my:RecipeParameter>
<my:PName>c</my:PName>
<my:EIName/>
</my:RecipeParameter>
</my:ParameterSection>
</my:Recipe>
<my:Filter>
<my:FilterRecipeName></my:FilterRecipeName>
<my:FilterPName></my:FilterPName>
</my:Filter>
</my:myFields>
The filter is set in the master table of <my:Recipe>.
Following filter works fine:
"contains(my:RecipeName, //my:FilterRecipeName)"
Example:
"contains(my:RecipeName, 'Name3')"
Result:
- 1 Recipe is shown in the table
Following filter doesn't work correct:
"contains(my:RecipeName/my:ParameterSection/my:RecipeParameter/my:PName, //my:FilterPName)" --> filter looks in the first element of <my:RecipeParameter>
".//my:RecipeParameterSection/my:RecipeParameter[contains(my:PName, //my:FilterPName)]" --> filter works in xml spy good, but in InfoPath it works not correct
I had tried many filters and had no found a correct solution.
I hope you can understand my problem and anybody knows a solution?
Thanks.
Mancha