How to get only the first level of nodes for a subform?

How can we get only the first level of nodes of a subform?
For ex:
Form1
     SubForm1
          Text1
          Text2
          RadioButton1
     SubForm2
          Text1
          Text2
          RadioButton1
     SubForm3
          Text1
          Text2
               SubForm31
                    RadioButton1
In this heirarchy if we give Form1.nodes will refer to all nodes under the Form1 (SubForm1,Test1,Text2,RadioButton1,SubForm2,...SubForm31, RadioButton1 etc..)
But is there any way that we can access only the first level of nodes of Form1 ie can we get only (SubForm1,SubForm2,SubForm3) for Form1 in any Way..?
Thanks.

Two ways .....
1. Use Javascript E4X instead ...there are nice functions for getting children of parents.
2. Cycle through all of the form1.nodes and look for objects that have a className of "subform". For loops are useful for this task.
Make sense?
Paul

Similar Messages

  • How to get only the first result in extract function

    do you know how to get only the first element of the function extract.
    v_result := p_response.doc.extract('//'||p_name||'/child::text()').getstringval();
    if i have 5 responses like '100','100',100','200','200' e get '100100100200200' and i want only '100'.
    thanks in advance

    Two ways .....
    1. Use Javascript E4X instead ...there are nice functions for getting children of parents.
    2. Cycle through all of the form1.nodes and look for objects that have a className of "subform". For loops are useful for this task.
    Make sense?
    Paul

  • How to replace only the first specified character in a string and leave other occurrence of the character alone.

    Hello my Friends:
    I have a string that looks like this in a column:
    Hello, World, Hello, Planet
    I want to replace only the first occurrence so that the result looks like this:
    Hello World, Hello, Planet
    Working on some bad data source.
    I need to replace the character regardless of it's location as long as it is the first.
    I tried something like this, but I soon discovered that if the comma or character is missing the the string may get truncated or altered. If there are no characters in the string, then I want to simply leave it alone.
    Here is where I am at:
    DECLARE @MyValue NVARCHAR(MAX) = 'Hello, World, Hello, Planet';
    SELECT MyString = STUFF('Hello, World', CHARINDEX(',', @MyValue, 0), 1, ' ');
    Thanks my friends.

    I have a string that looks like this in a column:
    Hello, World, Hello, Planet
    Why doesn't it say Hello Kitty?
    Oh, sorry about that. Anyway:
    SELECT MyString = CASE WHEN CHARINDEX(',', @MyValue, 0) >= 1
                           THEN STUFF(MyString, CHARINDEX(',', @MyValue, 0), 1, ' ')
                           ELSE MyString
                     END;
    Erland Sommarskog, SQL Server MVP, [email protected]
    Erland, love you sense of humor!! :)
    Thanks for the solution.

  • How to get only the selected layer data?

    Hi All,
              I'm using dissolve sample plugin. I added two layers in photoshop both of different dimensions, say 1000 * 1000 & 2000 * 2000. Now I select the layer with 1000 * 1000 dimension and click on Dissolve plugin. The preview image what is shown in dissolve plugin dialog is not just the selected layer, but also some extra pixels around the selected layer.
    Do I need to set any flag for getting only selected layer data to display in preview?
    Also I need to get only the selected area in a particular layer. When I checked FilterRecordPtr, haveMask flag is TRUE if the part of the layer is selected. But how do I get only the part of the layer that is selected for displaying preview image?
    Please let me know if the description is not clear.
    Thanks,
    Dheeraj

    Thanks Tom Ruark for the response.
    That is exactly the same thing what I'm seeing.
    1.Is there a direct way to know the bounds of the layer without the transparency grid so that I can show only the layer?
    2. If I select an area of 50*50 within a layer(1000*1000) using Rectangular Marquee tool, then I want only that selected area to be shown in preview. For this there is a haveMask flag which indicates whether or not there is selection, but the selected bounds are not available. I'm currently calculating the bounds. I just wanted to know if Photoshop SDK has any field for getting the bounds?

  • How to get only the graphics path without graphics names?

    Hi All,
    I need to get only the graphics path without graphics names like 'd:\Images\' instead of 'd:\Images\abc.jpg' in JS.
    Thanks,
    Praveen

    Something like this should get you close…
    #target indesign
    function main() {
         if (app.documents.length == 0) {
              alert('Please have an "Indesign" document before running this script.');
         return;
         docRef = app.activeDocument;
         with(docRef) {
              var x = rectangles[0].allGraphics[0].itemLink.filePath;
              var y = new File(x).parent.fsName;
              $.writeln(y);
    main();

  • How to get only the date without the time in the footer of a printout?

    Is there a way to get only the date without the time in the footer of a printout?

    As far as I can tell, there's no built-in option to get the date printed without the time. It's hardcoded in a C++ file.
    As a workaround, you can enter custom text for the footer, but it would need to be updated every time the date changed. I can think of a couple ways to automate that:
    * An add-on (but I'm not aware of any add-on for this)
    * External process to push a new date into prefs.js, a settings file that stores your header/footer preferences, among others (but Firefox should be closed when you update this file, and it will be read when you restart)
    Not easy enough, I know.

  • How to get only the whole number omitting the decimals

    Hi Experts,
    I want to get only the whole number of a output field. For example  i am getting an output as 8.766 , i need only the value 8 .
    I checked by moving the values to integer field but i am getting the rounding value 9 .
    I want only the whole value 8.
    Please help me out..
    thanks & Regards.
    Reena..

    Hi Reena,
    Unfortunately when you assign a packed number to a character, numeric or even a packed no without a decimal value SAP does a internal conversion of rounding these value. So direct assignment would won't work for your case.
    You can use the following logic instead for getting the whole number.
    DATA : LV_VAR1 TYPE STRING,
                LV_VAR2 type p DECIMALS 3 value '8.766'.
    LV_VAR1 = lV_VAR2.   " LV_VAR1 would contain 8.766 without rounding.
    write  : LV_VAR1(1).   " LV_VAR1(1) contains 8 which you can assign to any target variable.
    I think there is no addition so as to avoid this internal rounding.
    Try and let me know if it works for you..
    Cheers
    Ajay

  • How to return only the first string

    Hi Guys,
    I have a mapping where I am creating a filename from data in within my data file, I am using one of my variables i.e. Account
    The data looks like this
    Account:
    123
    123
    123
    456
    456
    456
    789
    789
    789
    What I want is to is return only the first row u201C123" and concatenate it with a constant to make up the filename.
    Any help will be appreciated.
    Kind Regards,
    CJ Bester

    very simple
    use copy value standard function like below.
    Account------->copyvalue(0)----------->
                                                                      CONCAT------------->TARGET
                                         Constant------->
    Regards,
    Raj

  • How to remove only the first .Period in a file name using CL.

    Hello!
    So, I've used code similar to this before to remove special characters.  It works for a period . as well, but, of course removes ALL periods.
    file=/Users/niles/Desktop/.test.txt; echo $file"${file//[\\.]/}"
    How do get a reult that only remove the first period . and leaves the rest?
    Thanks!!

    touch .test.txt .t.e.s.t.t.x.t
    # Test it.
    $ for FILE in .test.txt .t.e.s.t.t.x.t
    do
    echo ${FILE} `echo ${FILE} | sed -n 's/^.//p'`
    done
    .test.txt test.txt
    .t.e.s.t.t.x.t t.e.s.t.t.x.t
    # then change the filename.
    $ for FILE in .test.txt .t.e.s.t.t.x.t
    do
    mv ${FILE} `echo ${FILE} | sed -n 's/^.//p'`
    done
    $ ls -l t*
    -rw-r--r--  1 andya  501  0 Apr 23 21:32 t.e.s.t.t.x.t
    -rw-r--r--  1 andya  501  0 Apr 23 21:32 test.txt

  • How to get ONLY the data shown in the plot area (Chart)

    My chart history length are 120000, often I don't need to save the whole
    buffer, just the data shown in the plot area?
    Richard Pettersen

    Hi Richard,
    you haven't said which version of LabVIEW you're using, so I've assumed 6.1, although this should be fine for older versions too.
    I put down a chart with a scrollbar, so I could go through the old data, and put an indicator attached to the x-scale->Range->minimum and x-scale->Range->maximum. These followed the displayed elements in the chart as I scrolled through the data. You can therefore link in the chart history (history data property of the chart) with a array subset to retrieve the appropriate portion.
    Be aware though. The minimum and maximum that the chart is showing on the x-scale may not be a part of the history data. E.g. if I set the history length to 1000 points, and produce on the first run, 1000 points, then my minimum and maximum are a
    t say 899 and 999. I then produce a second set of data, 1000 points long, and my min and max move to 1899 and 1999. As my history data is only 1000 long, I can scroll back to 1000 OK, but my min and max used as indexes don't relate anymore. The array of data is from 0 to 999, but my indexes can run from 1000 to 1999. So I have to add in a check that sees how much data is available before attempting to index, and then it's down to the flow of the program to try to work out where the data actually is (I'll leave that one to you - you'll need to keep track of the history data compared to the maximum (shown just after a point is added though this then makes a mess of your data! - possible to keep a track of new minimum when adding new data : the maximum (which will show once new data goes on) minus the history length gives the minimum that can be scrolled to - subtract this from all max's and min's to get real offset into the data - history length can be got from the history data and an a
    rray size sub .vi)
    Obviously there's no problem if you're clearing the graph everytime you either plot new data, or reach maximum capacity on the history data as the indexes return to zero.
    Hope that helps
    S.
    // it takes almost no time to rate an answer

  • How to get only the latest record in a folder

    Hi all,
    We have an OA SIT that is not a "standard" SIT in that it does not have the traditional Begin and End date. It only has an Effective date. Is there some way I can filter this table to only give me the latest record in the series? I know how to do this in SQL, but don't see how it would be possible in the EUL.
    We're trying to avoid creating database views, but at this point, I'm thinking it may be the easiest way to address this. Any other suggestions?
    Thanks in advance,
    Jewell

    Jewell.
    Of course I'm not going to mention that I have no idea what a 'standard' SIT is compared to your basic 'non-standard' SIT ... and I have to watch my spelling of such ... but however ...
    As you're most likely aware, in SQL you would get all the 'standard' SIT records first by going through the table. Then you'd go back through them all and find the most recent one.
    Because of this 2 table pass, I agree that just putting the SQL code in a custom folder (as you're not using views) would make the most sense.
    Russ

  • How to get only the record which is different by outer join

    Hi,
    how to get the values Existing in table A which are not existing in table B by using left outer join, In this example only the record '3' should display. thanks
    the requirementment is like
    Table A.Number Table B.Number
    1 1
    2 2
    3 4
    4 5
    output
    3

    SQL>  with a as (
    select 1 a from dual union all
    select 2 a from dual union all
    select 3 a from dual union all
    select 4 a from dual
    b as (
    select 1 a from dual union all
    select 2 a from dual union all
    select 4 a from dual union all
    select 5 a from dual
    select a.*
      from a left outer join b on (a.a = b.a)
    where b.a is null
             A
             3

  • How to map only the first occurance to the op in graphical mapping

    Hi,
    i have a record whose occurance is ' * '.But to the output i need to only map the value of the field which comes in the first occurance of the record.Can anyone help me in this.its very urgent.
    For ex :
    my input is
    <header>
    <inp1>123</inp1>
    <inp2>hello</inp1>
    </header>
    <header>
    <inp1>456</inp1>
    <inp2>hello</inp1>
    </header>
    To the output field <op1> i have to Map ' inp1 ' field but it has to take the value of the first inp1 i.e "123" only always.Any help on how to do this.
    Thanks in advance,
    Bhargav
    Message was edited by:
            bhargav gundabolu

    Hi Raj,
    My inp structure is:
    <header>
    <inp1>123</inp1>
    <inp2>hello</inp1>
    </header>
    <header>
    <inp1>456</inp1>
    <inp2>hello</inp1>
    </header>
    This has to me mapped to the output structure
    <result>
    </op1>
    </result>
    After Mapping inp1 to op1 my structure should appear as
    <result>
    <op1>123</op1>
    </result>
    <result>
    <op1>123</op1>
    </result>
    where <Header> node is mapped to </result>.As <result> has to appear as many times as Header appears.But the <op1> value has to be same as that of the <inp1> of the first <Header>

  • How to get only the dc component of a dc signal with noise?

    I need to read a temperature value (a dc value). However signal has some noise in it, and i need to get it out. How can i make it? Using a low pass filter? Which one.? Is there any DC pass filter?

    First, depending on the sensor you are using and how you are making the measurement, make sure you use the appropriate VI from the palette:
    Data Acquisition -> Signal Conditioning
    Sure you can use most of the filters located in:
    Signal Processing -> Filters
    Create a constant from the "filter type" input and select "Lowpass".
    There is also an AC & DC estimator vi, located in:
    Signal Processing -> Measurement
    Always remember to check the shielding of your system.
    Finally, check the following at NI, which have good information on how to get rid of noise:
    DC voltage
    Regards;
    Enrique
    www.vartortech.com

  • How to get only the last part of the URL in the doGet() method?

    In the doGet() method is there a way to check what URL it was called from ? For example the URL was: http://localhost:8080/myproject/jsp/randomPhrase.php (the php here is purely for misleading purposes - it's all Java really). in the doGet() method I would like to get the "randomPhrase" part of the URL only - to determine where to redirect the user. How can I do that?
    Thanks.

    Hello there,
    As it seems to me the part of the URL you're looking fo,r corresponds actually to the name of the servlet, so why don't you just call the getServletName method?

Maybe you are looking for