A loop in the Variable XML records!

Hello

I get no way how to do this. I get the XML below from a custom component of DSC. Now, I need to treat it.

<root>
    <records total_records="4">
        <record>
            <jobno>1122</jobno>
            <cust_name>Abhinav</cust_name>
            <email>[email protected]</email>
            <stat>1</stat>
        </record>
        <record>
            <jobno>2233</jobno>
            <cust_name>Doctor Dhober</cust_name>
            <email>[email protected]</email>
            <stat>0</stat>
        </record>
        <record>
            <jobno>4666</jobno>
            <cust_name>Vinau Dubey</cust_name>
            <email>[email protected]</email>
            <stat>1</stat>
        </record>
        <record>
            <jobno>7677</jobno>
            <cust_name>Nelesh Poda</cust_name>
            <email>[email protected]</email>
            <stat>0</stat>
        </record>
    </records>
</root>

Now, I have to loop through each record & to do something for each of them. In my approach, I must send a mail to each user in the XML file. I tried using the Set selector to SET the node VALUE, but without success. Any help.

Thank you.


-

Afonso

Your xpath does not match your XML code - you're missing the root node in your xpath expression:

Expression: /process_data/myXML/records/record[1]/email

must be:

/ process_data/myXML/root/records/plug [1] / email

When you build your loop there is another thing to be careful.  If you evaluate a variable xpath within another xpath expression, it gets inserted string.  This happens even if the variable is an integer.  For example: if I have a whole variable counter that is equal to 3 and evaluate:

/ process_data/myXML/root/Records/record [/process_data/@counter] / email the xpath expression will insert "3" (a string) and not an integer, as you can imagine.  The result will not be the third node. This can be a source of frustration, and it's difficult to debug.

Instead, use the number inside the expression:

/ process_data/myXML/root/Records/record [number (/process_data/@counter)] / email

I've attached an example of process that shows this.

Tags: Adobe LiveCycle

Similar Questions

  • loops through the sections XML &lt; RecieptDetails &gt; and for each record found...

    My input XML file is...
    I get this XML using file adapter...

    <? XML version = "1.0" encoding = "UTF-8"? >
    -< root xmlns:ns2 = "http://www.w3.org/2001/XMLSchema" >
    -< ns2:ReceiptBatch >
    < ns2:FileID > "99999" < / ns2:FileID >
    < ns2:Warehouse > in THE < / ns2:Warehouse >
    'L' < ns2:Revision > < / ns2:Revision >
    < ns2:DocID > A4 < / ns2:DocID >
    -< ns2:Receipt >
    < ns2:DeliveryNo > 123 - OP < / ns2:DeliveryNo >
    < ns2:ProcessDate > 112138 < / ns2:ProcessDate >
    < ns2:ContainerNo > 98765 < / ns2:ContainerNo >
    < ns2:Instructions > TREKAU < / ns2:Instructions >
    < ns2:ReceiptType > 1 < / ns2:ReceiptType >
    < ns2:SuppCustCode > 111 < / ns2:SuppCustCode >
    TREK-Cycle < ns2:SuppCustName > < / ns2:SuppCustName >
    -< ns2:ReceiptDetails >
    < ns2:Line > 1 < / ns2:Line >
    < ns2:ProductCode > 1000 < / ns2:ProductCode >
    < ns2:QuantityAdvised > 1 < / ns2:QuantityAdvised >
    < ns2:QuantityReceived > 1 < / ns2:QuantityReceived >
    < / ns2:ReceiptDetails >
    -< ns2:ReceiptDetails >
    < ns2:Line > 2 < / ns2:Line >
    < ns2:ProductCode > 2000 < / ns2:ProductCode >
    < ns2:QuantityAdvised > 2 < / ns2:QuantityAdvised >
    < ns2:QuantityReceived > 2 < / ns2:QuantityReceived >
    < / ns2:ReceiptDetails >
    -< ns2:ReceiptDetails >
    < ns2:Line > 3 < / ns2:Line >
    < ns2:ProductCode > 2000 < / ns2:ProductCode >
    < ns2:QuantityAdvised > 3 < / ns2:QuantityAdvised >
    < ns2:QuantityReceived > 3 < / ns2:QuantityReceived >
    < / ns2:ReceiptDetails >
    < / ns2:Receipt >
    < / ns2:ReceiptBatch >
    < / root >

    There are 2 tables in the database.
    Table 1 = T1743512
    Table 2 = T2743002

    table - structure

    T1743512-

    DOCO KCOO DTCO LNID LNIX LITM NOTICE USR JOBN UPMJ PID'M CKNU UREC
    123 00026 1 1 1000 1 1 123 - OP OP
    124 00026 1 1 1000 1 1 124 - OP OP
    123 00026 2 2 1000 2 2 123 - OP OP
    123 00026 3 3 1000 3 2 123 - OP OP



    Things to do are:--

    1. Research Notice T1743512 (table) with the following keys:
    1.T1743512. CKNU = < DeliveryNo > XML
    2.T1743512. LNIX = XML < row >
    II. write a record in the T2743002 table for each < RecieptDetails >. (See map below)

    Mapping of the records in the table T2743002 to < ReceiptDetails >

    EDU - "SABSSV".
    EDBT - < EDBT > (the same for all records)
    EDTN - < DeliveryNo > (from the section < reception > XML)
    EDLN - < row > (from < ReceiptDetails > section in XML format)
    EDSP - white
    DOCO - white
    DCTO - white
    KCOO - white
    LNID - white
    LITM - < ProductCode > < ReceiptDetails > section
    UORG - < QuantityAdvised > < ReceiptDetails > section
    UREC - < QuantityReceived > < ReceiptDetails > section
    USER - "SABSSV".
    JOBN - "SOA - 3PL".
    PID - 'PO-ENTRANTS ".
    UPMJ - current Date Julian
    - Hour current HHMMSS



    Please suggest the solution.

    Published by: Prashant_AP on June 22, 2012 12:24 AM

    Hello

    Solution by using a loop in BPEL;
    1 count the number of nodes for ReceiptDetails.
    2 create a counter for loop through each node ReceiptDetails. Use a while loop in BPEL
    3 search T1743512 (table) with DeliveryNo and the line. Make sure that you select the correct line from the ReceiptDetails node element node. This can be done using the counter example of xpatch ns2:ReceiptBatch / ns2:Receipt / ns2:ReceiptDetails [counter] / ns2:Line. Please use the DB adapter.
    I guess that the DeliveryNo can only appear once in the document following your example.
    4. for each receiptDetails you write a record in table too T2743002. Please use the DB adapter.
    5. Since the time increment the counter. This is to ensure that the while loop stops at the point where the counter is greater then the number of nodes to ReceiptDetails.

    I think a better solution is to make the loop in PL/SQL. It will be faster. You specify an input of type of collection in your pl/sql package parameter. Assign all items receiptDetails and DeliverNo line to the PL/SQL package. Within PL/SQL unravel you the closure. With a little luck, you have the T2743002 in the same schema to create the record too. Otherwise create synonyms of the database or database links.

    Good luck

    Thank you

    Sander

  • How to make the variable data record (intermittent time), with a real-time display

    I'm a complete newbie to Labview. We are currently developing a piece of hardware in the lab to automatically take the readings of the concentration of a sample, through correlations with voltage readings. I have read and worked through the getting started with Labview .pdf, but other than that my knowledge is minimal. I have a flowsheet of work who is able to do it correctly and display and write the data in real time. However, I want to be able to write to a file only every 10 minutes or so, since experiments can run for several days and the amount of data it currently logs is unnecessary.

    Would be nice if he could write it in columns like this:

    [date time]  [voltage ave]  [levels]

    xx                     xx                        xxx

    xx                     xx                        xxx

    xx                     xx                        xxx

    .. .but only once every 10 minutes. Or at any interval of time, I put.

    I tried to connect different parallel loops, but I failed miserably. I don't know if it is a relatively simple problem for you guys to help me with.

    I have attatched file. Please note that the file variables.txt is there simply to hold the settings for the correlation of concentration, which took charge of him.

    In addition, advice or tips to improve this would be greatly appreciated.

    Hi mooray.

    I took a quick look at your code, but you should be able to do something like this:

    When you have an Express VI elapsed time set to 600 seconds (10 minutes). If every 600 seconds time out will pass a Boolean TRUE, which will allow to write the measurement file Express VI. Therefore, what iteration of the while loop, you would write some input comes in the signal input to write it into a file position.

    There are other ways to do this as well, but it's pretty simple. I hope this helps!

    Thanks for choosing National instruments.

    Aaron P

    National Instruments

    Technical sales engineer

    http://www.NI.com/support

  • Update process variable (XML) to help set the value

    Hello

    I'm having a problem to update the value in the variable XML using SetValue (by the XPATH expression). It is removing my original XML and replacing it with a new one. I'm off clue why this happens.

    My steps:
    1. I created a variable of XML type and set it as a STARTER, REQUIRED.

    xmlData.jpg

    2. I am updating this variable using the activity set the value. In my process, it is "locUpdate1".

    setVal.jpg

    The original XML is: (xmlData value)

    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:dd="http://ns.adobe.com/data-description/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" timeStamp="2011-01-03T07:31:26Z" uuid="009257fd-3f66-449d-b554-6a095f917b74">
    <xfa:datasets>
            <xfa:data>
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1/>
                            <UserName1/>
                            <UserID2/>
                            <UserName2/>
                            <UserID3/>
                            <UserName3/>
                            <CurrentUserID>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</CurrentUserID>
                            <CurrentUserName>Sarah Rose</CurrentUserName>
                        </UserInfo>
                    </applicantInformation>
                    <FSTARGETURL_/>
                </GetUserRoot>
            </xfa:data>
            <dd:dataDescription dd:name="GetUserRoot">
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1/>
                            <UserName1/>
                            <UserID2/>
                            <UserName2/>
                            <UserID3/>
                            <UserName3/>
                            <CurrentUserName/>
                            <CurrentUserID/>
                        </UserInfo>
                    </applicantInformation>
                </GetUserRoot>
            </dd:dataDescription>
        </xfa:datasets>
    <pdf xmlns="http://ns.adobe.com/xdp/pdf/" href="-4608764380271080676-28"/>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
            <annots/>
        </xfdf>
    </xdp:xdp>

    After operating, it evolves to

    <GetUserRoot>
        <applicantInformation>
            <UserInfo/>
        </applicantInformation>
    </GetUserRoot>
    
    

    should not be done.

    I want to just copy the value of the an element in the other.

    /process_data/xmlData/GetUserRoot/applicantInformation/UserInfo/UserID1 = /process_data/xmlData/GetUserRoot/applicantInformation/UserInfo/CurrentUserID
    
    

    Output should be:

    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:dd="http://ns.adobe.com/data-description/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" timeStamp="2011-01-03T07:31:26Z" uuid="009257fd-3f66-449d-b554-6a095f917b74">
    <xfa:datasets>
            <xfa:data>
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</UserID1>
                            <UserName1>Sarah Rose</UserName1>
                            <UserID2/>
                            <UserName2/>    
                            <UserID3/>
                            <UserName3/>
                            <!-- this is to be coiped in above -->
                            <CurrentUserID>6967A5DE-D5EB-102D-BF7F-0000C0A8010C</CurrentUserID>
                            <CurrentUserName>Sarah Rose</CurrentUserName>
                        </UserInfo>
                    </applicantInformation>
                    <FSTARGETURL_/>
                </GetUserRoot>
            </xfa:data>
            <dd:dataDescription dd:name="GetUserRoot">
                <GetUserRoot>
                    <applicantInformation>
                        <UserInfo>
                            <UserID1/>
                            <UserName1/>
                            <UserID2/>
                            <UserName2/>
                            <UserID3/>
                            <UserName3/>
                            <CurrentUserName/>
                            <CurrentUserID/>
                        </UserInfo>
                    </applicantInformation>
                </GetUserRoot>
            </dd:dataDescription>
        </xfa:datasets>
    <pdf xmlns="http://ns.adobe.com/xdp/pdf/" href="-4608764380271080676-28"/>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
            <annots/>
        </xfdf>
    </xdp:xdp>

    Any help to what I'm doing wrong.

    Thank you.

    -

    Afonso

    Your mission is incorrect. Note that you need to reference all the XML nodes (to the right of the ROOT node)

    Since your reference node is not absolute, it will create the nodes that you have defined in your expression on the left.

    The following code should work as expected!

    /process_data/xmlData/xdp/datasets/data/GetUserRoot/applicantInformation/UserInfo/UserID1 = /process_data/xmlData/xdp/datasets/data/GetUserRoot/applicantInformation/UserInfo/CurrentUserID
    

    Nith

  • XML report shows the parameters instead of the name of the variable

    I would like to than the actual variable name to be included in the report XML rather than the "settings."  I tried many things to get there without success.  Any ideas?

    Ok. It must be in the stylesheet that I use for the XML report.  I am an accountant on an older version of the horizontal.xsl due to some customizations, and the problem I have described does not occur when I use the latest version of the stylesheet.  Must have been a bug that has been fixed.

    Thank you

    Kevin

  • How to create a loop to add gradually to the variable?

    I want to create a loop for which will activate 1000 times. Initially, I put a variable to zero. Using the VI has 500 loops, it will begin to add 1 every time to the variable, so in the end, the variable must have a value of 500.

    I tried to make this VI but had trouble with the variables; for example, him setting an initial value. Is there an example in LabVIEW that can help me?

    Looks like a pretty simple VI, but I'm having difficulties.

    Any help would be greatly appreciated.

    Hi penguins,.

    It is here LV8.5...

    It is pretty basic, so you should have a look on the free courses online on the website NOR!

  • by the way the variable counter between the loops

    I have a question about the passage of a variable counter between different events / while loops and seen an increase in value regardless of the loop is initiated.

    The fundamental problem is that I write file names unique to data collected on a spectrometer, and I would value at the end of the name of the file to increment every time that I collect the data. There are several different ways that I can collect the data, and I'd like the counter to increment when the collections is triggered. The attachment shows essentially what I'm trying to accomplish. Represent it buttons collect two different types of data I collect my instrument, but the counter variable is not passed correctly between the two loops. Is it possible that I can get the incrementing counter so that the two loops read the same value of counter?

    Thanks for your help.

    MICAH

    I can't look at your code since I'm on a phone. But you should really only have / need a structure of the event in a vi. The only exception I can think of is one to manage the events of the user and the other for GUI events. But even in this case there is no reason that I can think to need two.

  • REGEXP_REPLACE how to loop through the occurrences of a text string variables

    Hello

    I use a 11.g Oracle procedure. I found an example of REGEXP_REPLACE with only two arguments (input and model) and created a procedure based on this example. The Replace function works, but not optimally. I try to use REGEXP_REPLACE to loop on a variable number of occurrences of a text string in a local variable of CLOB.  The string occurs after the text base64 (base64 comma) and before the text "/ > (double quote space oblique superior - only)."  I can do replace it work for a single occurrence, but I can't do it properly in a loop.  These embedded strings include images that were inserted in a rich Apex text field.  This is a rich text field is assigned to the CLOB p_html.

    Declare p_html clob;
      l_image_clob clob;
      l_image_count number;
    Begin
    p_html := '<p>Some header text base64,one start here and then this is the end one" /></p><p>Some header text base64,two start here and then this is the end two" /></p>';
    l_image_count := REGEXP_COUNT(p_html, 'base64', 1, 'i');
    If l_image_count > 0 Then
      For i In 1..l_image_count Loop
      l_image_clob := REGEXP_REPLACE(p_html, '(.*base64,)|(" />.*)');
      dbms_output.put_line(l_image_clob);
      -- code to process each occurrence individually.
      End Loop;
    End If;
    End;

    What I would like to see results of the data are:

    tenure here and that's the end

    two beginning here and that's the end of two

    The results I get are:

    two beginning here and that's the end of two

    two beginning here and that's the end of two

    Thanks a lot for watching this.

    Hello

    From Oracle 11.1, REGEXP_SUBSTR is better than REGEXP_REPLACE for this sort of thing.

    What produces the output you asked for:

    Declare

    CLOB p_html;

    CLOB l_image_clob;

    number of l_image_count;

    Begin

    p_html: = '

    ' Some header text base64, start here and then it's the end "/ >

    Some header text base64, two start here and then it's the end of two"/ >

    ';

    l_image_count: = REGEXP_COUNT (p_html, 'base64', 1, 'i');

    If l_image_count > 0 Then

    For i In 1... l_image_count loop

    l_image_clob: = REGEXP_SUBSTR (p_html )

    , "base64,(.*?)" / > "

    1

    , I - letter i (loop variable), not number 1

    , 'i'

    1

    );

    dbms_output.put_line (l_image_clob);

    -code to treat each case individually.

    End loop;

    End If;

    End;

    /

    The 4th argument to REGEXP_SUBSTR specifies where desired appearance (starting with 1).

    The 6th argument is a backreference. 1 means you want to return all that match the expression starting with the 1st '('. gauche)

  • Lessons on the looping and global variables in functions

    I'm trying to gather a complete inventory of virtual machines and hosts in my environment.  For VMS, I am train to collect the information below but problem a loop in the case of hard drives and network cards.  For example, on hard drives, I get the following result:

    VMNIC1: Network card 1
    NICMAC1: 00:50:56:87:01:e6
    NICNetwork1: dvPortGroup6666

    NICState1: Logged, GuestControl, StartConnected
    HDName1: hard drive 2
    StorageFormat1: thin
    HDCapacityGB1: 100
    Datastore1: [RXCXN00020] host108a/host108a_1.vmdk

    As you can see, only the last instance of the disc is saved in my outings.  In other words, HDNamex is never incremented but the value (here "drive 2") always represents the last disk that is, this virtual machine has two disks.  I have a few virtual methods with five disks and, in this case, there HDName 1 to a value of hard drive 5.  How properly I loop through each instance of my hard drives?

    A key part of my information on Virtual Machines is the Cluster they are on.  This value, however, is only available by attribute parent of the host object.  Therefore, I created a hash table to try to do that research, but it seems that the hash table is lost outside the function Get-HostInfo.  Note the Get-VMInfo function tries to access the values in this Hashtable with the following result:

    Cannot perform indexing in a null table.
    D:\scripts\VMInventory.ps1:36 tank: 82
    + $VMStuff | Add-Member-type noteproperty-name HostCluster-value $HostHashTa
    wheat [< < < < $VMStuff.Host]
    + CategoryInfo: InvalidOperation: (host012.domain.com:VMHostIm
    [of] pl), RuntimeException
    + FullyQualifiedErrorId: NullArray

    Looks like I need to be "global" and not just its function, this hash table.  Any help of any of these two issues would be greatly appreciated.  Here is my code:

    Function Get-HostInfo {}
    Begin {}
    {In process
    $HostStuff = new-object psobject
    $HostHashTable = @ {}

    $HostStuff | Add-Member-type noteproperty-name HostName-value $_
    $HostStuff | Add-Member-type noteproperty - name PowerState-value of $_. PowerState
    $HostStuff | Add-Member-type noteproperty-name CPUQty-value of $_. NumCpu
    $HostStuff | Add-Member-type noteproperty-name of generation - value $_. Build
    $HostStuff | Version-value add-Member-type noteproperty-name $_. Version
    $HostStuff | Add-Member-type noteproperty-name manufacturer-value of $_. Manufacturer
    $HostStuff | Add-Member-type noteproperty-name MemoryTotalGB-value of $_. MemoryTotalGB
    $HostStuff | Add-Member-type noteproperty-model name - value of $_. Model
    $HostStuff | Add-Member-type noteproperty-name NetworkInfo-value of $_.NetworkInfo
    $HostStuff | Add-Member-type noteproperty-name of Cluster - value of $_. Parent
    $HostStuff | Add-Member-type noteproperty-storage of value-name $_. StorageInfo

    $HostHashTable [$HostStuff.HostName] = $HostStuff.Parent

    write-output $HostStuff
    }
    {End}
    }

    Function Get-VMInfo {}
    Begin {}
    {In process
    $VMStuff = new-object psobject
    $VMHashTable = @ {}

    $VMStuff | Add-Member-type noteproperty - name VMName-value $_
    $VMStuff | Add-Member-type noteproperty-name Mnmemonic-value of $_. Folder
    $VMStuff | Add-Member-type noteproperty-name of the host - value $_. Host
    #Link the virtual machine to its location of cluster
    $VMStuff | Add-Member-type noteproperty-name HostCluster-$HostHashTable [$VMStuff.Host value]
    $VMStuff | Add-Member-type noteproperty - name PowerState-value of $_. PowerState
    $VMStuff | Add-Member-type noteproperty-name ProvisionedSpaceGB-value of $_. ProvisionedSpaceGB
    $VMStuff | Add-Member-type noteproperty-name UsedSpace-value of $_. UsedSpaceGB
    $VMStuff | Version-value add-Member-type noteproperty-name $_. Version
    #Get information about the adapter on each instance
    $AdapterInfo = get-NetworkAdapter $_
    {foreach ($Adapter to $AdapterInfo)
    $j = 1
    $VMStuff | Add-Member-type noteproperty-name VMNIC$ j-$Adapter.Name value
    $VMStuff | Add-Member-type noteproperty-name NICMAC$ j-$Adapter.MACAddress value
    $VMStuff | Add-Member-type noteproperty-name NICNetwork$ j-$Adapter.NetworkName value
    $VMStuff | Add-Member-type noteproperty-name NICState$ j-$Adapter.ConnectionState value
    $j ++
    } adapter #end foreach loop
    Information disk hard #Get for each instance
    $HardDisks = hard disk get $_
    {foreach ($HD in $Harddisks)
    $i = 1
    $VMStuff | Add-Member-type noteproperty-name HDName$ I have $HD value. Name - force
    $VMStuff | Add-Member-type noteproperty-name StorageFormat$ I have $HD value. StorageFormat-force
    $VMStuff | Add-Member-type noteproperty-name HDCapacityGB$ I have $HD value. CapacityGB-force
    $VMStuff | Add-Member-type noteproperty-name data store $ I have $HD value. Filename-force
    $i ++
    } foreach #end HD loop
    #Select the windows machines for obtaining information from WMI
    If ($_ - like "w *") {}
    $OSinfo = get-WmiObject-class Win32_OperatingSystem - computer $_
    $VMStuff | Add-Member-type noteproperty-name OSSerialNumber-$OSinfo.SerialNumber value
    $VMStuff | Add-Member-type noteproperty - name OSVersion-value $OSinfo.Version
    $VMStuff | Add-Member-type noteproperty-name OSVServicePack-$OSinfo.ServicePackMajorVersion value
    $VMStuff | Add-Member-type noteproperty-name OSCaption-$OSinfo.Caption value
    $VMStuff | Add-Member-type noteproperty-name OSInstallDate-$OSinfo.InstallDate value
    $VMStuff.OSInstallDate = ([WMI] "). ConvertToDateTime (($OSInfo). InstallDate). ToString ("yyyy-MM-DD hh: mm :") ")
    $VMStuff | Add-Member-type noteproperty-name OSLastBoot-$OSinfo.LastBootupTime value
    $VMStuff.OSLastBoot = ([WMI] "). ConvertToDateTime (($OSInfo). LastBootUpTime). ToString ("yyyy-MM-DD hh: mm :") ")
    $ComputerInfo = get-WmiObject-class Win32_ComputerSystem - computer $_
    $VMStuff | Add-Member-type noteproperty-name OSSystemType-$ComputerInfo.SystemType value
    IP #Get each adapter information
    $OSNICArray = @)
    $OSNICrecord = get-wmiobject Win32_NetworkAdapterConfiguration - filter IPEnabled = TRUE - computer $_. Select legend, IPAddress,: IPSubnet, DefaultIPGateway, DNSDomainSUffixSearchOrder and DNSServerSearchOrder
    $OSNICArray += $OSNICrecord
    {foreach ($LAN to $OSNICArray)
    $VMStuff | Add-Member-type noteproperty-name OSAdapterName-value $LAN. Legend
    $VMStuff | Add-Member-type noteproperty-name OSIPAddress-value $LAN. IPAddress
    $VMStuff | Add-Member-type noteproperty-name OSIPSubnet-value $LAN. : IPSubnet
    $VMStuff | Add-Member-type noteproperty-name OSGateway-value $LAN. DefaultIPGateway
    $VMStuff | Add-Member-type noteproperty-name OSDNSSearchOrder-value $LAN. DNSServerSearchOrder
    $VMStuff | Add-Member-type noteproperty-name OSDNSSuffix-$LAN.dnsdomainsuffixsearchorder value
    } foreach LAN #end loop
    } #end if

    $VMHashTable [$VMStuff.VMName] = $VMStuff.Host

    write-output $VMStuff
    }
    {End}

    }
    #Specify location to search
    $Location = 'My Place'
    SE connect-VIServer 'VIServer1 '.

    #Gather the host information
    $HostatSite = get-vmhost-location $Location
    $HostatSite | Get-Hostinfo
    #$HostatSite | Get-Hostinfo | export-csv "d:\scripts\server-report\'$Location'-HostReport.csv".

    #Gather VM information
    $VMatSite = get-vm-location $Location
    #$VMatSite | Get-VMInfo | export csv d:\scripts\server-report\$Location-VMReport.csv - NoTypeInformation
    #$VMatSite | Get-VMInfo | ConvertTo-Html | Set-Content d:\scripts\server-report\$Location-VMReport.htm
    $VMatSite | Get-VMInfo

    The problem is that the Export-CSV cmdlet examines the properties of the first record it only reads and displays the properties for all the records. You can leave the script write a dummy record as the first album with all the columns that are possible. That will solve this problem.

  • OSB - item values change in the variable of XML response

    I get the response xml in OSB following variable:

    <>sets

    < doc >

    < name > testing Documents < / name >

    < links >

    < link >$ $U https://test1.com$ $DTesting Document1 < / link >

    < link >$ $U https://test2.com$ $DTesting Document2 < / link >

    < link >$ $U https://test3.com$ $DTesting Document3 < / link >

    < link >$ $U https://test4.com$ $DTesting Document4 < / link >

    < / links >

    < / doc >

    < doc >

    Reviews of < name > < / name >

    < links >

    < link >$ $U https://exams1.com$ $DExams Document1 < / link >

    < link >$ $U https://exams2.com$ $DExams Document2 < / link >

    < / links >

    < / doc >

    < / sets >

    I want to edit (delete $$you and $$ J + content and keep the onlt https link) the above xml response and send a final response to the customer as follows:

    <>sets

    < doc >

    < name > testing Documents < / name >

    < links >

    < link > https://Test1.com < / link >

    < link > https://test2.com < / link >

    < link > https://test3.com < / link >

    < link > https://Test4.com < / link >

    < / links >

    < / doc >

    < doc >

    Reviews of < name > < / name >

    < links >

    < link > https://exams1.com < / link >

    < link > https://exams2.com < / link >

    < / links >

    < / doc >

    < / sets >

    Thank you and best regards,

    Rakesh

    [code]

    XQuery version "1.0" encoding "Cp1252";

    (: parameter pragma = "$anyType1" type = "xs: anyType" ::))

    (: pragma type = "xs: anyType" ::))

    declare namespace xf = "http://tempuri.org/ProcesIntegratieService/test/";

    declare function xf:test ($anyType1 as element (*))

    {element (*)}

    {

    for $doc in $anyType1/Doc

    return

    {$anyType1/Name}

    {

    for $link in $doc/links/link

    return

    {substring-after (substring-before($link,'$$D'),' $$U ')}

    }

    }

    };

    declare the variable $anyType1 as element (*) external;

    XF:test ($anyType1)

    [/ code]

    output

    [code]

    https://Test1.com

    https://test2.com

    https://test3.com

    https://Test4.com

    https://exams1.com

    https://exams2.com

    [/ code]

  • SLQ: A loop with the select line, counters and variables

    Hello!

    I have a bit of a pickle SQL and would be very happy to any experienced help.
    I have a big enough table that contains two columns in particular (illustrated by a few examples)

    REFERENCE
    Mouth Med Chem (2008) 16, 1111-1124
    Bioorg Med Chem Lett. 2008 may 1; 9:2820 - 4 EPUB 2008 Apr 4
    BR J Pharmacol. In February 1999; 3:665 - 72.

    2_ YEAR
    1996
    2001

    Sometimes, the two columns are null. What I want to do, it is to loop through the table and pull on the date of the REFERENCE column and update the YEAR_2 column with it.

    My current code snippet is as follows:

    declare
    x number: = 1995;
    cursor s1 is SELECT rowid, t.* FROM CB1ASSAYS t WHERE REFERENCE like "%x % ';
    Start
    While x loop < 2006
    C1 loop s1
    Update CB1ASSAYS set YEAR_2 = x
    where REFERENCE like "%x % ';
    x: = x + 1;
    end loop;
    end loop;
    commit;
    end;
    /


    However, it doesn't seem to work properly. He updated lines with 1995 in the year, but no date higher. Curiously, he updated a number of records with the year 2064, when there was no 2064 anywhere in the REFERENCE entry.

    There are no errors encountered when I run this script.

    Any idea?

    Thank you!

    In your code the where conditions update should be:

    WHERE REFERENCE like '%'||x||'%';
    

    and you can get rid of the slider at all:

    declare
     x number := 1995;
    begin
     while x < 2006 loop
       update CB1ASSAYS set YEAR_2 = x
       where REFERENCE like '%x%'
       AND YEAR_2 is null --To update only null years
       ;
       x := x + 1;
     end loop;
    --commit;  IT's better you you commit after checked if all is ok...
    end;
    /
    

    Max

    Published by: Massimo Ruocchio July 5, 2011 19:59
    got rid of the cursor loop for...

  • To loop through all the variables on an image

    Hello. I am trying to write a method to save the State of the game that I do. I am able to loop through all the clips and get their existing frameworks, but is it possible to loop through all the variables on the current frame (without knowing their names) and put them in a table?

    Thanks 4 any help

    trigger2160

    Thanks for the help. A container object is just what I wanted, even though I knew not u can do. my variables are not accessible directly so I managed to change the way they were stored easily without negative effects for the rest of the game. Now I can also save and load the State of the game which entered 4 will facilitate 4 me to test.

    trigger2160

  • evaluate the variable name in a loop in cs3

    I want to generate names of variables in a loop and assign it a library object.

    e.g. public var missing1_mc:MissingGameObjects;
    public var missing2_mc:MissingGameObjects;
    public var missing3_mc:MissingGameObjects;
    public var missing4_mc:MissingGameObjects;

    Now, in a loop, I want to do the following:

    var ClassReference: Class;
    var missing_obj:String;

    for (var i = 0; i < usedNo.length; i ++) {}
    missing_obj = main_obj + usedNo [i] + '_', '_x ';
    ClassReference is getDefinitionByName (missing_obj) classroom;.
    'lack' + (i + 1) + "_mc" = new ClassReference(); wrong code
    'lack' + (i + 1) + "_mc".setpos (150 100); wrong code
    }

    How could I do that. Any help is appreciated.

    If you try to use the object variable names and classes of the variables, you can use the following (assuming that everything is set):

  • Table row with loop for each group to set the variable.

    HI: There is probably a simple answer for this, but I don't the have not found...

    I have a single row table to move through a group to set a variable containing a sum running. I'm not display the amount in the table but when I saw the report, I see that the table is expanding (add lines) for each loop.

    The only line table has 3 columns.

    1st column
    <? for-each: AC_GROUP? >

    2nd column
    <? xdoxslt:set_variable ($_XDOCTX, 'xAmtVar', xdoxslt:get_variable($_XDOCTX,'xAmtVar') + CURRENT_AMOUNT)? >

    3rd column
    <? end foreach? >

    Can I use <? for each group? > or something else. My requirement is to set the value of the variable with the total running, but because the loop is adding lines for each value he travels (though not displayed), it's also affecting other areas of the presentation of the page.

    Hope it makes sense. Thanks in advance.

    You can do it many ways.

    No need to loop
    You can create a variable and specify the amount of the sum directly to that.

    
    

    or

    loop through, then add as you do.

    
    

    give any space or enter characters in a word between them, just put it in a single form field will be

    But as I said, I'd definitely go with the first option.

  • loops for each: the type of the variable

    I see warning in the editor telling me that the type of the variables in my curls foreach was not specified. I use an XMLList type (such as the collection) and I can not understand what should be the type of each element.
    Here is a sample of my code.

    var xmlList:XMLList = xmlDoc.dataTable [0] .dataRow;
    for each {(var xmlList)
    }

    So what is the type of the variable "item" supposed to be? I tried the XMLNode, but it isn't like that. The debugger shows me the 'node', but does not show the type.

    Shiv


    Never mind. I realized that it should be of XML type.

Maybe you are looking for