-
You can use the round() function. Keep in mind that round() only works to whole numbers, so to get your 2 decimal places, you have to do some multiplying and dividing by 100:
round(my:field1 * 100) / 100
-
Cool! Glad you got it figured out. What was your solution?
-
Thanks for sharing this David... as I do make use of named node properties frequently enough... its good to know this ahead of time so that I'm not bitten by it!
-
Is this a question about InfoPath? If so, I don't understand exactly what you are trying to accomplish.
-
If you are using InfoPAth 2003:
var wshShell = new ActiveXObject("Wscript.Shell");
var wshEnv = wshShell.Environment("Process");
var username = wshEnv.Item("UserName");
If you are using InfoPath 2007, the user name is built in. For example:
* Insert a text box.
* Right-click the text box and choose ...
-
I would insert a line for a MSGBOX(oOSOA) or Alert() etc after each line to verify you are getting the field values and the concatenated value is correct. Can't remember which command does a pop up message in VBS but at least then you can see what is transpiring. Is & the right choice for concatenation?
-
When I use this code I get 0 in the Intro:
//=======
// The following function handler is created by Microsoft Office InfoPath.
// Do not modify the name of the function, or the name and number of arguments.
//=======
function CTRL136_5::OnClick(eventObj)
{
var mail = XDocument.DataAdapters("TEST-NOCC");
var oOSOA = ...
-
http://www.infopathdev.com/forums/p/3645/12813.aspx#12813
http://www.infopathdev.com/forums/p/3782/14800.aspx#14800
Here are some related posts to get you started.
-
I appreciate it but seems I can not find anything that has worked so far!
I am not sure what I am doing wrong..
-
Welcome to the forum Scott.I am pretty sure, that with code, you could customize the Intro of the email to include your fields. mail.Intro but you should be able to search on the site here for posts on email and code.