-
I just ran the following code in the OnClick of a button and the button behaved as if I was actually clicking the checkbox. What language are you using?
function CTRL2_5::OnClick(eventObj)
{
var check = XDocument.DOM.selectSingleNode( ''//my:field1'' );
if( check.text == ''true'' )
check.text = ''false'';
else
check.text = ...
-
Check out this thread:
http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=1213
Also, if you search around the MSDN InfoPath blog they wrote a article on how to decode base64 files.
http://blogs.msdn.com/infopath/search.aspx?q=decode+base64&p=1
---------------
Matt Faus
InfoPath Dev Texas
-
You could add a rule to the calculated field that says ''if calculated field is blank calculated field = EQUATION''.
A way to do it with code is as follows, but I suggest sticking with the first option.
You will want to roll through all of the rows of the repeating table and ''touch'' each node so that the value is recalculated. Check out this ...
-
The reason you are getting the Node Test Expected error is because you need to specify which v1 you are trying to reference. Since the table is repeating you have several v2s (hence the sum(v2)) and several v1s. If the expression box is inside the repeating table row you should be able to use the function button on the expression box and Insert ...
-
XPath is used to traverse the DOM of your schema.
If you made a blank new form and inserted one text field the XPath to get to that node would be:
''/my:myFields/my:field1''
Also, I'm sorry about the confusion, but instead of
XDocument.selectSingleNode()
it should be
XDocument.DOM.selectSingleNode()
I guess I forgot - my apologies!
Here is ...
-
Check out this really cool article for more information:
http://blogs.3sharp.com/Blog/davidg/archive/2005/08/12/920.aspx
---------------
Matt Faus
InfoPath Dev Texas
-
You might be able to do this using XPath, but I think using SQL statements would be easier.
Using the SQL information and code I listed above your psuedo-code for onLoad will look like this:
*Query the database to get the first 2 records (use ORDER BY 'id' DESC LIMIT 2)
*set currentID to the first ID returned
*set nextID to the second ID ...
-
If the last name and first name are split into two nodes, such as firstName and lastName, then you can set the drop-down to use firstName as the Display Name and lastName as the Value. This way, when you set your textbox to reference the drop-down it will get the Value.
---------------
Matt Faus
InfoPath Dev Texas
-
You probably need to remove the xsi:nil attribute. I use this helper function:
IXMLDOMNode nNextAction = thisXDocument.DOM.selectSingleNode(''my:myFields/my:NextAction'');
removeNil(nNextAction).text = ''blah'';
public IXMLDOMNode removeNil(IXMLDOMNode n)
{
//Determine whether the xsi:nil attribute is set for this
//element. If so, remove the ...
-
Thanks for the encouragement, Pich! Good luck in all future developments, let us know of any spectacular discoveries, and if you have any questions!
---------------
Matt Faus
InfoPath Dev Texas