-
Hi smileforest,
Your xpath is correct to find the maximum value from time field. Can you tell me the ‘time#%92 field data type? Math.Max will return the largest value of all the numerical elements in a node set. If your ‘time#%92 data type is integer or double it works correctly.
-
Hi Mancha,
First of all I am confirming your requirement is, when you enter data in text box and validation method will call when you click on the button right.
For this you need write code in OnClick event: In this you check values against a database and if doesn#%92t exist in the database set ‘true#%92 value for one new field (my:validate) ...
-
Hi Mancha,
If you want validation on your field after clicking the button then you need to write code in onClick event. In this event depends on your validation you can set set ‘true#%92 or ‘false#%92 value to some other new field (either main DOM or secondary DOM). Depends on new field value you can set the validation on your field in InfoPath.
-
Hi mlaffoon Welcome to the Forum,
Please check out this tutorial:http://infopathdev.com/howto/tutorials/default.aspx?i=9111ef580f95479890fc18fb2c5bac85
-
Hi Diaboloche,
By using below the code you can get the node and after try to set that node value. Check once again your field xpath is correct or not. Can you explain on which line you got the error?
//Get the node
var tbContextNode = XDocument.DOM.selectSingleNode(''//my:tbContext'');
//Set the node value
tbContextNod.text = “1”;
-
Hi Shaun Nieves,
Can you explain on which line you got the error? IF you debug it OnLoad it should display the line number for the error.
-
Hi Ali,
By clicking on this control your context is move to top of your page
Here is the code (C#.net):
public void CTRL81_5_OnClick(DocActionEvent e)
{
// Write your code here.
IXMLDOMNode topNode = thisXDocument.DOM.selectSingleNode (''XPath of your field'');
thisXDocument.View.SelectText(topNode, Type.Missing);
}
-
Hi LinFeng,
We should not use thisXDocument.ViewInfos[''My View Name''].IsDefault = true statement in onClick event. If we try debugging on this statement in other than onLoad event we didn#%92t get the IsDefault property. We need to write this statement in onLoad event only. You can write below code in your onLoad event for your ...
-
Hi Ekzarov Welcome to the Forums,
By using below line of code you can get the complete url of the form where the form is opened and from which document library it is opened. Using this document library ID library value you can pass to your form.
var url = XDocument.Solution.URI;
-
Hi Jim Weir,
You are populating some field#%92s values by using rules right. Then you need to have one condition on that rule depends the form is new or old one. This value we can find using onLoad code as below.
var formState = XDocument.IsNew;
XDocument.DOM.selectSingleNode(''/my:myFields/my:FormState'').text = formState;
In FormState field ...