Initialize repeating section from web service

I

iamegghead

I hope someone can give me some insight on this.

I have an InfoPath 2007 form that is going to gather data from employees
across the company. A part of the form is dependant on the department. There
can be 3-7 identical sections but with different headings. Ie. Dept1 has
sections called A, B, C, Dept2 has sections called W, X, Y, Z etc.

I was hoping I could connect to a web service that returns a collection of
headings and have the form create a repeating section (containing several
controls) for each heading.

Unfortunately, I can bind the repeating section to this web service method
and display the header, but then I'm not able to bind the other controls as
repeating values.

I guess I should be coming at this a different way but I'm not seeing it.
 
I

iamegghead

Maybe I can ask this question in a more generic way.

The problem I'm having seems to stem from how Infopath treats a repeating
section. It seems that I need to bind a repeating section to a repeating
group in the data source and any controls, such as textboxes, within the
repeating section that need to be bound to data, need to use data that is
part of the repeating group.

So lets say I want to initialize one of the textboxes in my repeating
section with a title. This title is to be looked up from a web service and
there will be a different title for each section (The number of titles will,
in fact, dictate the number of sections). This value shouldn't need to be in
my main data source as it isn't user data that needs to be saved, but it
seems that infopath forces me to put that data into the main data source if I
want to use it in the repeating section.

This makes it hard to initialize the repeating section portion of the form
because I can't just pull the values from a secondary data source and bind to
it, I have to account for this data in my main data source and use code to
insert the initial values. This works but it ends up being quite a bit of
work and it seems clumsy.

Does this sound right? Is there another way of coming at this?

Thanks
 

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