Howto: Address a field from a data source

L

Lidschi

Hi Newsgroup,

I can hardly explain what I want so I use an example:

If I start a blank new form and put a text box called "test" in the form I
can address the field in code via my:test.
BUT: If I already have data from a SQL Server connection in myFields and
then create a new text box called "test" it gets listed as my:test.

How can I then address this field inside code? And how can I address fields
that are e.g. in myFields==>queryFields==>q:[query_name]==>Account?

Thanks in advance for your kind help.

Regards
Lidschi.

P.S Can someone recommend a good book about Infopath since there is none
available yet in German language.
 
M

Matthew Blain \(Serriform\)

Here's a trick I use a lot:

Create an Expression box bound to the field you want. In either the primary
or a secondary data source.
Then look at the expression, it will have something very close to what you
want.
You'll also need to set the namespace prefix properties correctly on the
secondary DOM
(XDocument.GetDOM("yourdom").setProperty("SelectionNamespaces",'xmlns:ns0="s
omething"'))

--Matthew Blain
http://tips.serriform.com/
http://www.microsoft.com/mspress/books/7128.asp
 

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