Populating a dropdown list in a repeating table

R

Renjith

hi,

I have some problems with populating a dropdown list in a repeating table of
infopath form with the data from web service.

Secondary Datasource
----------------------

CATEGORY
- CategoryID
- CategoryName
- Description

PRODUCT
- CategoryID
- ProductID
- ProductName

RATINGS
- RatingNumber
- RatingName
- CategoryID

I have a repeating table which is bound to "CATEGORY" group. Within this I
have another repeating table which is bound to "PRODUCT" group.
In the PRODUCT group repeating table I want to also show the "RATING" for
the current category in a dropdown list against each Product.
So rating will be pertaining to the parent Category. I have problems while
populating values in the rating dropdown. I tried using filter in the
dropdown properties with the condition CategoryID of "RATING" with
CategoryID textbox field. But it doesnot work. What could be the problem ?
Any suggestions ?

The listing in repeating table will be something like this-

CategoryID 1 (in Textbox)
Product1(in expresssion box) Rating1,Rating2,Rating3,Rating4,Rating5 (in
dropdown list)
Product2
Rating1,Rating2,Rating3,Rating4,Rating5
Product3
Rating1,Rating2,Rating3,Rating4,Rating5
Product4
Rating1,Rating2,Rating3,Rating4,Rating5
Product5
Rating1,Rating2,Rating3,Rating4,Rating5

CategoryID 2
Product11(in expresssion box)
Rating10,Rating20,Rating30,Rating40,Rating50 (in dropdown list)
Product12
Rating10,Rating20,Rating30,Rating40,Rating50
Product13
Rating10,Rating20,Rating30,Rating40,Rating50
Product14
Rating10,Rating20,Rating30,Rating40,Rating50
Product15
Rating10,Rating20,Rating30,Rating40,Rating50


Following is the xml returned by the web service which is bound to repeating
tables.

<Categories>
<Category CategoryID="1" CategoryName="Category 1" Description="xyz">
<Products CategoryID="1" ProductName="Product1">
<Products CategoryID="1" ProductName="Product2">
<Products CategoryID="1" ProductName="Product3">
<Products CategoryID="1" ProductName="Product4">
<Products CategoryID="1" ProductName="Product5">
<Ratings RatingNumber="1" RatingName="Rating1" CategoryID="1" />
<Ratings RatingNumber="2" RatingName="Rating2" CategoryID="1" />
<Ratings RatingNumber="3" RatingName="Rating3" CategoryID="1" />
<Ratings RatingNumber="4" RatingName="Rating4" CategoryID="1" />
<Ratings RatingNumber="5" RatingName="Rating5" CategoryID="1" />
</Category>
<Category CategoryID="2" CategoryName="Category 2" Description="xyz">
<Products CategoryID="2" ProductName="Product11">
<Products CategoryID="2" ProductName="Product12">
<Products CategoryID="2" ProductName="Product13">
<Products CategoryID="2" ProductName="Product14">
<Products CategoryID="2" ProductName="Product15">
<Ratings RatingNumber="10" RatingName="Rating10" CategoryID="2" />
<Ratings RatingNumber="20" RatingName="Rating10" CategoryID="2" />
<Ratings RatingNumber="30" RatingName="Rating20" CategoryID="2" />
<Ratings RatingNumber="40" RatingName="Rating30" CategoryID="2" />
<Ratings RatingNumber="50" RatingName="Rating40" CategoryID="2" />
</Category>
</Categories>

Thanx
Renjith
 
V

virgul

Hi,

I think you have to go on infopathdev.com section exemple. He has an
exemple about how to do that!

Say thanks Greg Collins


++

Thierry
 

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