The Selected Control is bound to the same field or group as anothe

X

xyz

Hi,
I have created an infopath form based on a template xml as follows:
<root>
<node type='image' id=''></node>
<node type='audio' src=''></node>
</root>

I added a repeating section each, for node1 and node 2, with the controls
for type and id for node1 and controls for type and src for node2.

Now when i preview, and click on insert node1, it is automatically showing
the controls for inserting node2 also. Can we prevent this? I want a
functionality where when i say insert node1, it should show only node1
controls. Since the repeating sections are bound to only one field, it is
showing both.
Can anyone help.
 
S

Shiva[autonomysystems.com]

Hi,

If you want to insert only nod1 then you need to create empty repeating
seciton with only node1 field in that section. Then if you insert it will
insert only node1 control and it will not insert the node2 control because
you are not displaying this control in InfoPath form.
 
X

xyz

Hi,
Maybe i was not clear in my requirement. This is how my application works.
First, i created a form based on a template xml. So when my xml was of the
format:
<root>
<node type='image' id='1'></node>
<node type='audio' src='audio.mp3'></node>
</root>
in the data source, you can see that node was added as one group, with type,
id and src as fields in it.
Using this data source, i have created the form with two repeating sections.
the first one has type and id. The second one has, type and src. when i
preview this form, i can see both the sections with their respective values.
Now when i try to click on insert item, for the first section, i can see that
it is showing both the sections in the insert interface. So now, instead of
having type and id controls in the insert section, i have type and id, type
and src controls also.When i click on insert, i want type and id controls
only to show up.
 

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