One way is to use the InfoPath help integrated into Visual Studio. Go to
Help, Search, filter on Microsoft Office InfoPath2003, and search for
Command.
This is also covered in Chapter 6 of the book below.
--Matthew Blain
http://tips.serriform.com/
http://www.developingsolutionswithinfopath.com/
Thanks Matthew, I found the help very useful.
Btw I'm working with a web service so I used:
WebServiceAdapter2 wsA =
(WebServiceAdapter2)thisXDocument.DataAdapters["ElencoSchede"];
What I have to do is change a parameter of the WebMethod, to refresh the
query. I didn't find any property/method to do so.
I did it using a DOMDocument50Class object, I copied into it the
thisXDocument.DataObjects["ElencoSchede"].DOM
to replace the query value: I wasn't able to selectSingleNode directly
on the original DOM because of namespace's issues, actually I had to set
the needed namespace on the new object.
It's quite a long way to perform a simple task, I wonder if I'm missing
something about the WebServiceAdapter2 capabilities.
thanks
Matthew Blain (Serriform) wrote:
> One way is to use the InfoPath help integrated into Visual Studio. Go to
> Help, Search, filter on Microsoft Office InfoPath2003, and search for
[quoted text clipped - 51 lines]
>>>>
>>>>thanks!
Matthew Blain \(Serriform\) - 10 Dec 2004 21:45 GMT
The adapter doesn't do anything special with the DOM (you can also call
GetDOM("elencoschede")). You will always have to deal with namespace issues
when using xpath. Typically I set namespace prefixes early in the process
(e.g. in the onload event, or immediately after calling Query).
You can also use rules or default values to set parameters in the web
service.
--Matthew
> Thanks Matthew, I found the help very useful.
> Btw I'm working with a web service so I used:
[quoted text clipped - 74 lines]
> >>>>
> >>>>thanks!