cannot update the data because the form is currently read-only

R

Richard

I am trying to call a web service with a text argument from code.
I need to set this text dyanmically at runtime. like this:

Dim queryValue1 As IXMLDOMNode
queryValue1 =
wsDOM.selectSingleNode("//dfs:myFields/dfs:queryFields/tns:MarkLogicQuery/tns:txtXquery")

Dim qst as string
qst = "<result>this is a test</result>"
queryValue1.text = qst

this is where I get the error:
Infopath cannot update the data because the form is currently read-only

Is this because the fields on the form are all read only ?? ? what is going
on ???
 
A

Alex [MSFT]

You must be doing this in the event handler where the DOM is read-only. Try
putting this code onto a button click handler, for example. To do so, add a
button to your form, double-click on it to edit properties, then click "Edit
Code" to view and modify the onClick handler.

Good luck,
Alex @ Microsoft
 
R

Richard

Infopath is nice, but I am finding for simplest things , I have to go around
and around.
Here is what I am doing:

I have a drop down box that is bound to an xml file, and it populates in
load time.
I want the user to click on the drop down and select an option, and
onchange, make a call to the webservice with the argument set based on the
selection. i.e.
I will set the queryvalue.
Can I not have rule instead, without getting to this error.
 

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