Pergunta

I have some data I want to fill in when my form opens, so I created an XML-file-based secondary data connection (it has to be a secondary connection, not the primary) with some sample values with the intent of later removing them and replacing them with real values. It basically looks like this:

<root>
    <entry>
        fields here
    </entry>
    <entry>
        fields here
    </entry>
</root>

(The second entry is so that InfoPath knows it has repeating values.)

I then bound <entry> to a repeating table in my form.

But when I open the form, there are exactly two values, and the options to allow adding/removing entries are greyed out. InfoPath knows that this is a repeating element, otherwise I wouldn't be able to bind it to a repeating table.

How can I change this to allow adding and removing entries?

Foi útil?

Solução

Apparently, secondary data sources cannot be modified. I found this information in the InfoPath help.

Modifying secondary data sources

Because the fields and groups in secondary data sources are based on data connections to external data sources, you cannot modify the fields and groups in a secondary data source. When you view a secondary data source in the Data Source task pane, the fields have the locked field icon and the groups have the locked group icon to indicate that you cannot modify them.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top