Search - InfoPath Dev Sign in | Join | Help InfoPath Dev InfoPath Dev is dedicated to bringing you the information and tools you need to be successful in your Microsoft Office InfoPath development projects. Home Blogs Forums Photos Downloads Search More Search Options Page 1 of 3 (28 items) 1 2 3 Next > Re: Listing the value of all fields in the datasource Hi Matt, Thanks for your solution, I didn't know how to use selectNodes to get all the descendants, but I now do, thanks to your example. Cheers, - Reg. Posted to Code (Forum) by rjohnson on 03-04-2006 Re: Listing the value of all fields in the datasource Hi Shanthi, Thanks for your reply. I tried the selectNodes idea that was given before by Agni, but as noted I couldn't get it to work. When I tried again, I noticed the length of the nodelist is always 1. I however noticed that it shows the number of a repeating section, but this is not what I wanted. After searching the internet, I found an ... Posted to Code (Forum) by rjohnson on 03-03-2006 Re: Getting the node type, ie: Group or Field. Hi K.Ramana, Thanks for your reply, However, I don't think that 'childNodes.length' can always guarantee that returning a 0, is always from a field. For example, I noticed that if the field is empty, it will return 0, but if the field contains a value, it will return 1. Contrary, if a ''group'' has no fields in it, it too will return 0. If ... Posted to Code (Forum) by rjohnson on 03-03-2006 Getting the node type, ie: Group or Field. Hi all, I was wondering if there was a way of determining whether a given node is a 'Group', or a 'Field', via JScript code. I've tried several ways to get that information, but none have succeeded. Since I can actually see whether it is a Group or Field in the InfoPath GUI, I would figure there is a way of getting that information with code. I ... Posted to Code (Forum) by rjohnson on 02-26-2006 Re: Getting the local-name of a field via JScript Code Thanks a lot for the idea MFaus. The only problem with your solution is that it adds a ''my:'' at the start. However, after some research, I found a way to get just the name of the field: If you use XDocument.DOM.selectSingleNode(''/my:myFields/my:field1'').baseName it will return field1 only. Thanks again for your help. - Reg. Posted to General (Forum) by rjohnson on 02-26-2006 Re: Getting the local-name of a field via JScript Code Hi Patrick, The local-name function: ''Returns the local part of the expanded name of the node in the node-set argument that is first in document order'' I basically want to use it to return the name of the datasource field. The full intent is to be able to create some script which will cycle through all elements in the datasource, and display ... Posted to General (Forum) by rjohnson on 02-23-2006 Re: Listing the value of all fields in the datasource Hi Agni, Thanks for your reply, but I am confused with your example code. I'll try to clarify my question: Pretend I have 5 field(elements), under the myFields group. I want to run some code which will find all fields under the myFields group and then display the fields value one at a time. From your code, I'm not sure what node is. I would ... Posted to Code (Forum) by rjohnson on 02-23-2006 Getting the local-name of a field via JScript Code Hi all, Is it possible to use the function ''local-name'', within managed JScript Code. I tried simply typing in ''local-name'', and used a field from the data source as its parameter, but it comes up with an error. Any help would be appreciated. - Reg. Posted to General (Forum) by rjohnson on 02-23-2006 Listing the value of all fields in the datasource Hi everyone, Is it possible to use code to run through all elements in the DataSource and display the output of each field. (ie: via a while loop) Also, is this possible to do this for a given folder within the DataSource? Posted to Code (Forum) by rjohnson on 02-22-2006 Custom functions, when setting a fields value. Hi, When I set a fields value, I can click the fx button and insert a predefined function to alter the value. (Such as concat or substring) Is there a way to define my own function via JScript, and call that function when setting the value of a field? Thanks, - Reg. Posted to General (Forum) by rjohnson on 02-14-2006 Page 1 of 3 (28 items) 1 2 3 Next > Copyright © 2003-2019 Qdabra Software. All rights reserved.View our Terms of Use.