-
Genius. Here is all the code, and it works great. I'll always have an English translation, but may be missing some other. This way, at least the English will always be dispalyed.//When loading the document, set all the labels to the default language id choice (english)
function XDocument::OnLoad(eventObj)
{ var ...
-
Well, selectSingleNode returns a node object if xpath matches or null otherwise. So if you do .text of something which is null, you will get an exception.
Instead, do something like that:
var someNode = something.selectSingleNode(someXPath)
if (someNode != null)
{
// do something with someNode.text
}
-
OK, I found the issue. I named my stringIDs on my Sharepoint list things like 'user_username' and 'user_emailaddress'. oNode.nodeName was returning 'my:user_username' etc. I used the string.replace("my:","") function and all is well. However, I was wondering. Is there a way ...
-
// using jscript - dont use vb, nobody is using vbscript in infopath, it hurts the brain, trust me.
//Call Wscript to get user logged in details:
var oNet = new ActiveXObject("Wscript.Network");
sUserID = oNet.surname;
// Call AD to get details about user:
var objSysinfo = new ...
-
What a quick answer :-)
Unfortunately I don't get it working, I put a query rule on textbox A, trying both with "is not blank" and "is present" conditions, but textbox A does not "fire" to connection 2.
Neither does the rules and custom code button work, although I carefully attach the textbox A to the button ...
-
The submit to SharePoint can be added to a button whether it is a submit button or via a rule on another button. It is an action of a rule.
Saving to a file share or any where else is a submit data connection as well.
You can go into form options and remove the ability to save the form manually by your users. Once the form is in ...
-
in an event handler you can use e.Site.text for example otherwise use XDocument.DOM.selectSingleNode("my:myFields/my:NameOfYourField") but please just check out the help files.
-
Technically this code seems to make sense but maybe there is something else under labels which causes this to fail. I would recommend to step through your code in the debugger, looking at oNode at each iteration.
-
So I made a form that gets submitted to a sharepont site but i am having trouble because the users can move around the form into folders on the document library so i need to make the submit button into a save one that only saves it.
Anyone have code to put on a button to save a form? I didnt see any action i could do to ...
-
So, now I'm trying to use that information to refresh all the data in those nodes by values stored in another data set. The complete code is:
function XDocument::OnLoad(eventObj)
{
var objTranslation = XDocument.DataObjects("ThirdPartyEvent_Translations").DOM; ...