Handling variable number of detected ojects in VBAI calculator

I have an inspection that searches for bright objects (holes) in a product, and typically it does not find any (good), but when it does I need to know the locations of each hole, to determine xy-boundaries of the region of holes, i.e., the mins and maxes of the xy-coordinates of each hole. To do this, I'd like to use a caclulator step and interate through all the holes found.....but I don't believe the calculator can handle a variable number of holes..or can it?
Thanks,
Eric
Solved!
Go to Solution.

It can if you put it in a loop with the index step indexing through each detected object and getting the center X, Y for hole[i], passing these results to caluclator, incrementing i, and using index step to get coordinates for next hole, and leave this state when no holes left.
Hope that  helps,
Brad
Attachments:
Looping Sample.vbai ‏15 KB

Similar Messages

  • Passing variable number of arguments in a stored procedure

    Hi Team,
    i am facing a problem. I have a dynamic form which contains some checkboxes. The number of checkboxes are dynamically generated on querying the database. On the form submission i want to call a stored procedure that will update the values in the database. i want to know that is there any way to handle variable number of arguments in the stored procedure or can i get the variables through some session context and use it in my stored procedure.
    Any help is greatly appreciated.
    Thanks&Regards
    Saurabh Jain

    Hi Saurabh,
    The method in which stored procedures are called on form submit is something as follows.
    Let us take your scenario of a form which has multiple checkboxes and a submit button. On clicking the submit button, this form data is submitted using either get or post. The form's submit action invokes a procedure.
    The HTML form code will look something like this..
    htp.formOpen( curl => 'URL /myProcedure',
    cmethod => 'post' );
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'A');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'B');
    htp.formCheckbox( cname => 'myCheckbox'
    cvalue => 'C');
    htp.formSubmit( cname => 'myButton',
    cvalue => 'OK');
    Now, whenever the submit button is clicked, all these form values are passed to our stored procedure 'myProcedure'.
    "myProcedure" looks something like this.
    procedure myProcedure
    myCheckbox IN sys.owa_util.vc_arr,
    myButton IN VARCHAR2
    is
    begin
    end myProcedure;
    The point to be noted here is that the name of the variable being passed in the procedure is the same as the name of the HTML element being created in the HTML form. So, there is a direct mapping between the elements in the HTML form and the procedure parameters.
    Another noteworthy point is that since you have multiple checkboxes in your HTML form, it is impractical to name all the checkboxes differently and then pass those many parameters to your procedure (Imagine a scenario where there are a hundred check-boxes in an HTML form!). So portal allows you to give the same name (cname) to all the checkboxes in your HTML form, and if multiple checkboxes are checked, it will return all the checkbox values in an array (Note the usage of "myCheckbox IN sys.owa_util.vc_arr" in myProcedure).
    You can check out this link for more information.
    Re: retrieving data from fields
    Thanks,
    Ashish.

  • Oracle XML processor is not handling variable properly

    I use the XML Parser 2.0.2.7 to process an XML transformation but I don't get the expected result. Running this example with other XML Processor get the job done (IBM, Excelon, Microsoft). I read again the normative document on www.w3c.org on XSL and I believe that your processor fail to render my XSL transformation because it doesn't handle variable properly.
    So, here is my XML document and my XSL stylesheet:
    XML Document:
    <Results>
    <Usager>
    <IdUsager>34</IdUsager>
    <NomUsager>NomUsager</NomUsager>
    <PrenomUsager>Le prenom de l'usager</PrenomUsager>
    <NoAssuranceMaladie>ZZZZ12121212</NoAssuranceMaladie>
    <dossiersommaire_view>
    <UsagerSommaire>
    <IdEven>2</IdEven>
    <TypeElement>16</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>1998-04-05</DateDebut>
    <IdDoc>5</IdDoc>
    <IdCatgElement>6</IdCatgElement>
    <Description>Initial</Description>
    <IdTypeElement>16</IdTypeElement>
    <IdCatgElement1>6</IdCatgElement1>
    <Description1>Bilan mitastatique initial</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>16</TypeElement1>
    <DroitAcces>M</DroitAcces>
    </UsagerSommaire>
    <UsagerSommaire>
    <IdEven>30</IdEven>
    <TypeElement>15</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>2000-06-08</DateDebut>
    <IdDoc>31</IdDoc>
    <IdCatgElement>6</IdCatgElement>
    <Description>Initial</Description>
    <IdTypeElement>15</IdTypeElement>
    <IdCatgElement1>6</IdCatgElement1>
    <Description1>Sommaire initial</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>15</TypeElement1>
    <DroitAcces>M</DroitAcces>
    </UsagerSommaire>
    <UsagerSommaire>
    <IdEven>7</IdEven>
    <TypeElement>6</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>2000-04-15</DateDebut>
    <IdDoc>1</IdDoc>
    <IdCatgElement>2</IdCatgElement>
    <Description>Examens</Description>
    <IdTypeElement>6</IdTypeElement>
    <IdCatgElement1>2</IdCatgElement1>
    <Description1>Examens numirisis</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>6</TypeElement1>
    <DroitAcces>C</DroitAcces>
    </UsagerSommaire>
    <UsagerSommaire>
    <IdEven>9</IdEven>
    <TypeElement>2</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>2000-03-14</DateDebut>
    <IdDoc>1</IdDoc>
    <IdCatgElement>1</IdCatgElement>
    <Description>Suivi</Description>
    <IdTypeElement>2</IdTypeElement>
    <IdCatgElement1>1</IdCatgElement1>
    <Description1>Suivi oncologique</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>2</TypeElement1>
    <DroitAcces>C</DroitAcces>
    </UsagerSommaire>
    <UsagerSommaire>
    <IdEven>10</IdEven>
    <TypeElement>2</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>2000-03-27</DateDebut>
    <IdDoc>1</Id Doc>
    <IdCatgElement>1</IdCatgElement>
    <Description>Suivi</Description>
    <IdTypeElement>2</IdTypeElement>
    <IdCatgElement1>1</IdCatgElement1>
    <Description1>Suivi oncologique</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>2</TypeElement1>
    <DroitAcces>C</DroitAcces>
    </UsagerSommaire>
    <UsagerSommaire>
    <IdEven>16</IdEven>
    <TypeElement>16</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>2000-06-05</DateDebut>
    <IdDoc>46</IdDoc>
    <IdCatgElement>6</IdCatgElement>
    <Description>Initial</Description>
    <IdTypeElement>16</IdTypeElement>
    <IdCatgElement1>6</IdCatgElement1>
    <Description1>Bilan mitastatique initial</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>16</TypeElement1>
    <DroitAcces>M</DroitAcces>
    </UsagerSommaire>
    <UsagerSommaire>
    <IdEven>26</IdEven>
    <TypeElement>15</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>2000-06-07</DateDebut>
    <IdDoc>32</IdDoc>
    <IdCatgElement>6</IdCatgElement>
    <Description>Initial</Description>
    <IdTypeElement>15</IdTypeElement>
    <IdCatgElement1>6</IdCatgElement1>
    <Description1>Sommaire initial</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>15</TypeElement1>
    <DroitAcces>M</DroitAcces>
    </UsagerSommaire>
    <UsagerSommaire>
    <IdEven>37</IdEven>
    <TypeElement>15</TypeElement>
    <IdUsager>34</IdUsager>
    <IdUtilisateur>1</IdUtilisateur>
    <DateDebut>2000-06-08</DateDebut>
    <IdDoc>32</IdDoc>
    <IdCatgElement>6</IdCatgElement>
    <Description>Initial</Description>
    <IdTypeElement>15</IdTypeElement>
    <IdCatgElement1>6</IdCatgElement1>
    <Description1>Sommaire initial</Description1>
    <IdUtilisateur1>1</IdUtilisateur1>
    <CodeProfil>3</CodeProfil>
    <CodeProfil1>3</CodeProfil1>
    <TypeElement1>15</TypeElement1>
    <DroitAcces>M</DroitAcces>
    </UsagerSommaire>
    </dossiersommaire_view>
    <categorie_view>
    <CatgElement>
    <IdCatgElement>1</IdCatgElement>
    <Description>Suivi</Description>
    <type_view>
    <TypeElement>
    <IdTypeElement>2</IdTypeElement>
    <IdCatgElement>1</IdCatgElement>
    <Description>Suivi oncologique</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>2</TypeElement>
    <DroitAcces>C</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>5</IdTypeElement>
    <IdCatgElement>1</IdCatgElement>
    <Description>Suivi pharmaceutique</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>5</TypeElement>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>3</IdTypeElement>
    <IdCatgElement>1</IdCatgElement>
    <Description>Suivi avec chimiothirapie</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>3</TypeEleme nt>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>4</IdTypeElement>
    <IdCatgElement>1</IdCatgElement>
    <Description>Evaluation psychosociale</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>4</TypeElement>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    </type_view>
    </CatgElement>
    <CatgElement>
    <IdCatgElement>2</IdCatgElement>
    <Description>Examens</Description>
    <type_view>
    <TypeElement>
    <IdTypeElement>6</IdTypeElement>
    <IdCatgElement>2</IdCatgElement>
    <Description>Examens numirisis</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>6</TypeElement>
    <DroitAcces>C</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    </type_view>
    </CatgElement>
    <CatgElement>
    <IdCatgElement>3</IdCatgElement>
    <Description>Ricidive</Description>
    <type_view>
    <TypeElement>
    <IdTypeElement>7</IdTypeElement>
    <IdCatgElement>3</IdCatgElement>
    <Description>Ricidives</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>7</TypeElement>
    <DroitAcces>C</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    </type_view>
    </CatgElement>
    <CatgElement>
    <IdCatgElement>4</IdCatgElement>
    <Description>Mitastase</Description>
    <type_view>
    <TypeElement>
    <IdTypeElement>8</IdTypeElement>
    <IdCatgElement>4</IdCatgElement>
    <Description>Mitastases</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>8</TypeElement>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    </type_view>
    </CatgElement>
    <CatgElement>
    <IdCatgElement>5</IdCatgElement>
    <Description>Traitement</Description>
    <type_view>
    <TypeElement>
    <IdTypeElement>9</IdTypeElement>
    <IdCatgElement>5</IdCatgElement>
    <Description>Chimiothirapie (nursing onco)</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>9</TypeElement>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>10</IdTypeElement>
    <IdCatgElement>5</IdCatgElement>
    <Description>Hormonothirapie (nursing onco)</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>10</TypeElement>
    <DroitAcces>C</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>12</IdTypeElement>
    <IdCatgElement>5</IdCatgElement>
    <Description>Radiothirapie - plan de traitement</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>12</TypeElement>
    <DroitAcces>C</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>13</IdTypeElement>
    <IdCatgElement>5</IdCatgElement>
    <Description>Radiothirapie - note de fin de traitement (rapport numirisi)</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement&gt ;13</TypeElement>
    <DroitAcces>C</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>14</IdTypeElement>
    <IdCatgElement>5</IdCatgElement>
    <Description>Chirurgie (rapport numirisi)</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>14</TypeElement>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    </type_view>
    </CatgElement>
    <CatgElement>
    <IdCatgElement>6</IdCatgElement>
    <Description>Initial</Description>
    <type_view>
    <TypeElement>
    <IdTypeElement>15</IdTypeElement>
    <IdCatgElement>6</IdCatgElement>
    <Description>Sommaire initial</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>15</TypeElement>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    <TypeElement>
    <IdTypeElement>16</IdTypeElement>
    <IdCatgElement>6</IdCatgElement>
    <Description>Bilan mitastatique initial</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>16</TypeElement>
    <DroitAcces>M</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    </type_view>
    </CatgElement>
    <CatgElement>
    <IdCatgElement>7</IdCatgElement>
    <Description>Autre</Description>
    <type_view>
    <TypeElement>
    <IdTypeElement>17</IdTypeElement>
    <IdCatgElement>7</IdCatgElement>
    <Description>Note du midecin</Description>
    <CodeProfil>3</CodeProfil>
    <TypeElement>17</TypeElement>
    <DroitAcces>C</DroitAcces>
    <IdUtilisateur>1</IdUtilisateur>
    <CodeProfil1>3</CodeProfil1>
    </TypeElement>
    </type_view>
    </CatgElement>
    </categorie_view>
    </Usager>
    </Results>
    XSL Stylesheet:
    <?xml version="1.0" encoding='ISO-8859-1'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output indent="yes" method="text" encoding='ISO-8859-1'/>
    <xsl:template match="*|/"><xsl:apply-templates/></xsl:template>
    <xsl:template match="text()|@*"><xsl:value-of select="."/></xsl:template>
    <xsl:template match="/"><xsl:text><html>
    </xsl:text>
    <xsl:text><BODY BGCOLOR= "#CEDFC6">
    </xsl:text>
    <xsl:text><APPLET CODEBASE="/applets/" CODE="SIRtree.class" WIDTH=200 HEIGHT=380>
    </xsl:text>
    <xsl:text><PARAM NAME="TITLEFONT" VALUE="0">
    </xsl:text>
    <xsl:text><PARAM NAME="ICONS" VALUE="/applets/DRQICON.gif">
    </xsl:text>
    <xsl:text><PARAM NAME="BGCOLOR" VALUE="8">
    </xsl:text>
    <xsl:text><PARAM NAME="NODEFONT" VALUE="3">
    </xsl:text>
    <xsl:text><PARAM NAME="HBGCOLOR" VALUE="2">
    </xsl:text>
    <xsl:text><PARAM NAME="TXTCOLOR" VALUE="2">
    </xsl:text>
    <xsl:text><PARAM NAME="HTXTCOLOR" VALUE="10">
    </xsl:text>
    <xsl:text><PARAM NAME="FONT1" VALUE="Helvetica|B">
    </xsl:text>
    <xsl:text><PARAM NAME="FONT2" VALUE="Helvetica|N">
    </xsl:text>
    <xsl:text><PARAM NAME="FONT3" VALUE="Arial|N">
    </xsl:text>
    <xsl:text><!-- Medium Grey -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color1" VALUE="150|150|150">
    </xsl:text>
    <xsl:text><!-- Black -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color2" VALUE="0|0|0">
    </xsl:text>
    <xsl:te xt><!-- Blue -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color3" VALUE="0|0|255">
    </xsl:text>
    <xsl:text><!-- Red -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color4" VALUE="255|0|0">
    </xsl:text>
    <xsl:text><!-- Orange -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color5" VALUE="255|128|0">
    </xsl:text>
    <xsl:text><!-- Dark Grey -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color6" VALUE="100|100|100">
    </xsl:text>
    <xsl:text><!-- Light Grey -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color7" VALUE="200|200|200">
    </xsl:text>
    <xsl:text><!-- Light Green -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color8" VALUE="206|223|198">
    </xsl:text>
    <xsl:text><!-- Yellow -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color9" VALUE="255|255|0">
    </xsl:text>
    <xsl:text><!-- White -->
    </xsl:text>
    <xsl:text><PARAM NAME="Color10" VALUE="255|255|255">
    </xsl:text>
    <xsl:text><PARAM NAME="BORDER" VALUE="0">
    </xsl:text>
    <xsl:text><!-- Menu principal -->
    </xsl:text>
    <xsl:variable name="NodeCPT" select='3'/>
    <xsl:text><PARAM NAME="NODE0" VALUE="ROOT|</xsl:text><xsl:value-of select="Results/Usager/NomUsager"/><xsl:text>"|1| | | | |0|-1">
    </xsl:text>
    <xsl:text><PARAM NAME="NODE1" VALUE="ROOT|</xsl:text><xsl:value-of select="Results/Usager/PrenomUsager"/><xsl:text>"|1| | | | |0|-1">
    </xsl:text>
    <xsl:text><PARAM NAME="NODE2" VALUE="ROOT|</xsl:text><xsl:value-of select="Results/Usager/NoAssuranceMaladie"/><xsl:text>"|1| | | | |0|-1">
    </xsl:text>
    <xsl:for-each select="/Results/Usager/categorie_view/CatgElement">
    <xsl:variable name="Racine" select="Description"/>
    <xsl:text><PARAM NAME="NODE</xsl:text><xsl:value-of select="$NodeCPT"/><xsl:text>" VALUE="ROOT|</xsl:text><xsl:value-of select="$Racine"/><xsl:text>|1| |mainFrame| | |1|-1|4">
    </xsl:text>
    <xsl:variable name="NodeCPT" select="$NodeCPT+1"/>
    <xsl:text>
    // Ajouter les Types d'iliment
    </xsl:text>
    <xsl:for-each select="type_view/TypeElement">
    <xsl:variable name="Feuille" select="Description"/>
    <xsl:text><PARAM NAME="NODE</xsl:text><xsl:value-of select="$NodeCPT"/><xsl:text>" VALUE="</xsl:text><xsl:value-of select="$Racine"/><xsl:text>|</xsl:text><xsl:value-of select="Description"/><xsl:text>|1| |mainFrame| | |1|-1|4">
    </xsl:text>
    <xsl:variable name="NodeCPT" select="$NodeCPT+1"/>
    <xsl:variable name="DroitAcces" select="DroitAcces"/>
    <xsl:if test="$DroitAcces = 'M'">
    <xsl:text><PARAM NAME="NODE</xsl:text><xsl:value-of select="$NodeCPT"/><xsl:text>" VALUE="</xsl:text><xsl:value-of select="$Feuille"/><xsl:text>|Ajouter...|3|http://drioq.qc.cgi.ca/jspdrioq/Elem_Query.jsp?IdTypeElem=</xsl:text><xsl:value-of select="TypeElementId"/><xsl:text>|mainFrame| | |0">
    </xsl:text>
    <xsl:variable name="NodeCPT" select="$NodeCPT+1"/>
    </xsl:if>
    <xsl:variable name="TypeElement" select="IdTypeElement"/>
    <xsl:for-each select="//Results/Usager/dossiersommaire_view/UsagerSommaire[TypeElement=$TypeElement]">
    <xsl:text><PARAM NAME="NODE</xsl:text><xsl:value-of select="$NodeCPT"/><xsl:text>" VALUE="</xsl:text><xsl:value-of select="$Feuille"/><xsl:text>|</xsl:text><xsl:value-of select="Description"/><xsl:text> du </xsl:text><xsl:value-of select="DateDebut"/><xsl:text>|2|http://drioq.qc.cgi.ca/jspdrioq/Elem_Query.jsp?IdEven=</xsl:text><xsl:value-of select="I dEven"/><xsl:text>|mainFrame| | |0">
    </xsl:text>
    <xsl:variable name="NodeCPT" select="$NodeCPT+1"/>
    </xsl:for-each>
    <xsl:if test="($DroitAcces = 'C')">
    <xsl:if test="(count(//Results/Usager/dossiersommaire_view/UsagerSommaire[TypeElement=$TypeElement]) = 0)">
    <xsl:text><PARAM NAME="NODE</xsl:text><xsl:value-of select="$NodeCPT"/><xsl:text>" VALUE="</xsl:text><xsl:value-of select="$Feuille"/><xsl:text>|Aucun Dossier |5| | | | |0">
    </xsl:text>
    <xsl:variable name="NodeCPT" select="$NodeCPT+1"/>
    </xsl:if>
    </xsl:if>
    </xsl:for-each>
    </xsl:for-each>
    <xsl:text>
    //-----------------------------------PAS TOUCHE----------------------------------------------------------
    </xsl:text>
    <xsl:text></BODY>
    </xsl:text>
    <xsl:text></html>
    </xsl:text>
    </xsl:template>
    </xsl:stylesheet>
    null

    First of all, thank for Steve and Micheal for your help.
    Well, it's that I don't read section 11.5 before I posted my last messages(I don't know how I did that??? may be to much nightly development) Also I think that xsl:variable just lead to misunderstanding. I would prefere the "xsl:constant" label.
    In neither way, I'm still looking for a solution to number my parameter because I don't each time how many parameter I'll have to pass to my applets. I'm now looking for pure JSP.
    Steve you also pointed out that the use of <xsl:text> is very strange! You're right! The main reason why I'm working that way is because we need to generate JavaScript based on the XML Data. So I start my stylesheet in text mode because I need to generate text (JavaScript) and not only tag like "PARAM". But to simply this example and focus on the problem I retired the JavaScript Part and any other not relevent tag! If there is a way to change the output mode after generating the JavaScript I would like to know about it.
    Ok, everyone thanks again!

  • Help with removing a variable number using "find and replace"

    Hey, I have to remove a variable number from a large number of documents.
    How would I do this using "find and replace"
    <text><![CDATA[Coloured 250]]></text>
    250 is an example of the variable number that I will need to remove so it looks like this:
    <text><![CDATA[Coloured]]></text>
    Note: the text "coloured" is subject to change also.
    Thanks

    That's a possibilitly I'll explore.  Thanks for the alternate perspective!
    (5 minutes later)
    Oh well, it was a good thought.
    Unfortunately each line of raw original text may contain from 1 to 4 lines of final text.  In other words there is no consistency in the number of backslashes (hard returns) in each line of original text, and thus, when backslashes are converted to commas, no consistency in the number of data elements in each data set. 
    Sadly PS variables will not handle finding a source text line that does not have data for 4 variables.  So I either have to go back and add enough commas on each short line to make four individual data elements for each data set... or I simply deal with the hard returns within Photoshop.
    I think I've reached the limit of automation on this process.

  • How can I set a variable number of values in a SQL IN clause?

    Hi,
    How can I set a variable number of values in a SQL IN clause without having to change the text of the SQL statement each time?
    I read the link http://radio.weblogs.com/0118231/2003/06/18.html. as steve wrote.
    SELECT *
    FROM EMP
    WHERE ENAME IN (?)
    But we need the steps not to create type in the system and would there be any other solution if we would like to use variable number of values in a SQL IN clause ?
    We are using JDeveloper 10.1.3.2 with Oracle Database 10.1.3.2
    Thanks
    Raj

    Hi,
    can you please explain why the solution from steve is not the right solution for you.
    regards
    Peter

  • Possible to do variable number of REPLACE in SQL?

    Hello. Using Oracle 10G, R2
    Wondering if it is possible to do a variable number of REPLACE() entirely in SQL in a view.
    input_table.text_column = This (b)is(/b) some (i)text(/i) with (u)formatting(/u) codes
    Note: Using ( and ) to represent < and >
    rows in format_codes_table:
    (b)
    (/b)
    (i)
    (/i)
    (u)
    (/u)
    (p)
    (/p)
    etc. (The number of format_codes is not fixed)
    Desired output: This is some text with formatting codes
    This could be done with a user-defined function and then use that function in a SQL:
    create or replace function remove_format_codes(input_p IN varchar2)
    return varchar2
       v_output   varchar2(2000);
    is
    begin
       v_output := input_p;
       for r1 in (select format_code from format_codes_table)
       loop
          v_output := replace(v_output, r1.format_code);
       end loop;
       return v_output;
    end;
    create or replace view unformatted_output_vw
    as
    select remove_format_codes(input_table.text_column) as unformatted_output
    from input_table
    /I tried this SQL:
    select replace(input_table.text_column, format_codes_table.format_code) as unformatted_output
    from input_table
        ,format_codes_table
    /But it only replaces one format code at a time, and it is not recursive so the output is like this:
    This is(/b) some (i)text(/i) with (u)formatting(/u) codes
    This (b)is some (i)text(/i) with (u)formatting(/u) codes
    This (b)is(/b) some text(/i) with (u)formatting(/u) codes
    This (b)is(/b) some (i)text with (u)formatting(/u) codes
    etc.
    I've google'd Oracle recursive sql, looked at CONNECT BY, LEAD, LAG, MODEL, and I've also looked at a
    Tom Kyte example for varying in lists (http://tkyte.blogspot.com/2006/06/varying-in-lists.html),
    but I can't seem to find a way to replicate the loop in my user-defined function in SQL.
    Anyone think this is possible in SQL? If yes, any hints?
    Thanks

    Hi,
    Regular expressions (introduced in Oracle 10) are great for this:
    SELECT     REGEXP_REPLACE ( text_column
                     , '&lt;'          || -- left angle-bracket
                       '/?'          || -- optional slash
                    '[bipu]'     || -- any one of these characters
                    '>'             -- right angle-bracket
                     )      AS no_tag_text
    FROM    input_table
    ;You had some good ideas: recursive subqueries (new in Oracle 11.2), CONNECT BY and MODEL could also do this job, but not nearly as easily.
    In case you're interested, the following thread uses MODEL to do nested REPLACEs:
    SQL Query
    Edited by: Frank Kulash on May 13, 2010 4:08 PM
    Edited by: Frank Kulash on May 17, 2010 1:02 PM
    Fixed link

  • Handling Unit Number against each PO Number/Sales Order

    Dear All,
    I have a query regarding identification of Handling Unit/s Number/s (Handling Unit Management) against each PO Number in Sales Order. E.g. I created 2 Sales Order with 5 and 7 line items respectively. Now I combine them into one Delivery which becomes as 12 Line items. Now against each PO Number/Sales Order line items I have done multilevel packing, similarly I have done this for 2nd PO Number/Sales Order line items while creating Outbound Delivery.
    As per my client's requirement, he wants to print the Handling Unit Number as per Sales Order PO Number. I have checked VEKP and VEPO where I am not able to segregate the Handling Unit Number against each Sales Order/PO Number. Please find below Screen Shot.
    Please help me out.
    Regards:
    Abhishek

    Hello,
      I'm not sure to understand completely your requirement.
    Anyway in VBFA you should have the complete flow of the documents:
    enter in VBFA with
    "Follow-on doc." (VBELN) = your HU number
    "Subs.doc.categ." (VBTYP_N) = 'X - Handling unit
    "Prec.doc.categ." (VBTYP_V) = 'J - Delivery"
    In this way for each Handling Unit you'll get the delivery number and item,  and from that you can branch to the corresponding Sales Order item number and get the customer's PO number.
    On top of that, in table VEPO you have the reference to Delivery number and item. The only thing you need is one more step using VBFA again, to get from the delivery and item numer, the corresponding Sales Order number and item.
    Best regards,
    Andrea

  • Display table with variable number of columns

    Hello Forum,
    I'm trying to build an export view of User Management Engine data. I would like to output a table with one row for every user with yes / no fields indicating membership in each of the available groups. Because the number of available groups might change in the future, I can't hardcode the column names for the groups.
    That is, I call a webservice to compute a table, and I get back a table with a variable number of columns.
    When I try to insert the webservice into my VC model, it complains:
    "Port 'Response' was omitted because it includes nested tables, which are not presently supported by Visual Composer"
    You might be interested to know that the business method of my webservice (for testing purposes) looks as follows:
    public String[][] getVariableSizeArray() {
            String[][] ret = new String[10][];
            for (int i = 1; i <= 10; i++) {
                    ret<i> = new String[10];
                    for (int j = 1; j <= 10; j++) {
                            ret<i>[j] = Integer.toString(i * j);
            return ret;
    Any help is appreciated, and points will be awarded for helpful answers,
    Sincerely,
    Florian
    Message was edited by:
            Florian Something

    Hi Florian,
    dynamic data structures are not supported. You can do this with a workaround. If you know the maximum count of your columns then you can add them to the table and hide/unhide them dynamicly via a formula in the hidden condition. Of course in your WS you als need a fix structure of your columns.
    This is not the best solution, I know so far, but it works. This is just one limit of VC.
    Best Regards,
    Marcel

  • UiXML tables - variable number of columns?

    I'm trying to define a <table> in a UIX page which will be generated from a set of parameters. This set of parameters will result in a varying number of columns so I'm looking at providing a DataObjectList which has DataObjects with keys for each of the columns attributes (header text, name of control, value of control etc.). I want to do something similar to <contents data:childData=...> on the <table> contents but this doesn't seem to work. It seems that <table> needs you to know how many columns will be present - is that so or is there some way I can do this?
    Cheers
    Ian

    Ian,
    That is correct, the uiMXL <table> element cannot currently support
    a variable number of columns (using something akin to the
    childData support in other contexts). But there are two approaches
    to get what you want.
    If you know the range of possible columns, then you can add a <column>
    element for each possible column in the <table>'s contents and then
    databind the rendered flag of the column element to hide/show the
    column as necessary.
    However, the real solution to your scenario, where the number of columns
    is completely unknown when you're designing the page, is our canonical
    example of a time you should write Java code for a portion of your page.
    Specifically, you can use the XML <include> element to refer to a
    DataProvider that will programatically create a TableBean. This
    technique is discussed in the Dynamic Structure for UIX pages
    portion of the UIX Developer's Guide.

  • Procedure with variable number of columns

    Hi, I have a procedure that looks like this:
    PROCEDURE PROC(p_cursor OUT sys_refcursor)
    And in the procedure, I build up QUERY dynamically and the number of columns varies at runtime.
    At the end I do
    OPEN p_cursor for QUERY
    Then to call this, I'm doing
    call PROC(?)
    My question is, how would I go about running the query from this procedure, then adding rows or modifying the existing results, then returning the modified data?
    What I want to do is add a new row based on some condition, so I still need to return a variable number of columns, but I need to modify the results before I return them.
    Is there any way of doing this? I need to do some calculations on the columns (the variable columns), create a new row, insert into result set, and return this new result set.

    A sys_refcursor is ideally suited to pass back to a front end gui like .NET or Java which can then use that cursor to retrieve the data.
    In PL/SQL there is no point in using a sys_refcursor unless you know, at design/compile time what the returned columns are going to be.
    If the resultant columns are dynamic, then you have no choice but to use the DBMS_SQL package, where you can parse and execute any SQL statement you like and then use the DBMS_SQL package to describe what the resultant columns are and how many there are. From that you can reference the columns by position rather than by name.
    e.g.
    CREATE OR REPLACE PROCEDURE run_query(p_sql IN VARCHAR2) IS
      v_v_val     VARCHAR2(4000);
      v_n_val     NUMBER;
      v_d_val     DATE;
      v_ret       NUMBER;
      c           NUMBER;
      d           NUMBER;
      col_cnt     INTEGER;
      f           BOOLEAN;
      rec_tab     DBMS_SQL.DESC_TAB;
      col_num     NUMBER;
      v_rowcount  NUMBER := 0;
    BEGIN
      -- create a cursor
      c := DBMS_SQL.OPEN_CURSOR;
      -- parse the SQL statement into the cursor
      DBMS_SQL.PARSE(c, p_sql, DBMS_SQL.NATIVE);
      -- execute the cursor
      d := DBMS_SQL.EXECUTE(c);
      -- Describe the columns returned by the SQL statement
      DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
      -- Bind local return variables to the various columns based on their types
      FOR j in 1..col_cnt
      LOOP
        CASE rec_tab(j).col_type
          WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
          WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
          WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
        ELSE
          DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
        END CASE;
      END LOOP;
      -- Display what columns are being returned...
      DBMS_OUTPUT.PUT_LINE('-- Columns --');
      FOR j in 1..col_cnt
      LOOP
        DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' - '||case rec_tab(j).col_type when 1 then 'VARCHAR2'
                                                                                  when 2 then 'NUMBER'
                                                                                  when 12 then 'DATE'
                                                         else 'Other' end);
      END LOOP;
      DBMS_OUTPUT.PUT_LINE('-------------');
      -- This part outputs the DATA
      LOOP
        -- Fetch a row of data through the cursor
        v_ret := DBMS_SQL.FETCH_ROWS(c);
        -- Exit when no more rows
        EXIT WHEN v_ret = 0;
        v_rowcount := v_rowcount + 1;
        DBMS_OUTPUT.PUT_LINE('Row: '||v_rowcount);
        DBMS_OUTPUT.PUT_LINE('--------------');
        -- Fetch the value of each column from the row
        FOR j in 1..col_cnt
        LOOP
          -- Fetch each column into the correct data type based on the description of the column
          CASE rec_tab(j).col_type
            WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
            WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_n_val);
            WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
                         DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'));
          ELSE
            DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
            DBMS_OUTPUT.PUT_LINE(rec_tab(j).col_name||' : '||v_v_val);
          END CASE;
        END LOOP;
        DBMS_OUTPUT.PUT_LINE('--------------');
      END LOOP;
      -- Close the cursor now we have finished with it
      DBMS_SQL.CLOSE_CURSOR(c);
    END;
    SQL> exec run_query('select empno, ename, deptno, sal from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    DEPTNO - NUMBER
    SAL - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    DEPTNO : 10
    SAL : 2450
    Row: 2
    EMPNO : 7839
    ENAME : KING
    DEPTNO : 10
    SAL : 5000
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    DEPTNO : 10
    SAL : 1300
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from emp where deptno = 10');
    -- Columns --
    EMPNO - NUMBER
    ENAME - VARCHAR2
    JOB - VARCHAR2
    MGR - NUMBER
    HIREDATE - DATE
    SAL - NUMBER
    COMM - NUMBER
    DEPTNO - NUMBER
    Row: 1
    EMPNO : 7782
    ENAME : CLARK
    JOB : MANAGER
    MGR : 7839
    HIREDATE : 09/06/1981 00:00:00
    SAL : 2450
    COMM :
    DEPTNO : 10
    Row: 2
    EMPNO : 7839
    ENAME : KING
    JOB : PRESIDENT
    MGR :
    HIREDATE : 17/11/1981 00:00:00
    SAL : 5000
    COMM :
    DEPTNO : 10
    Row: 3
    EMPNO : 7934
    ENAME : MILLER
    JOB : CLERK
    MGR : 7782
    HIREDATE : 23/01/1982 00:00:00
    SAL : 1300
    COMM :
    DEPTNO : 10
    PL/SQL procedure successfully completed.
    SQL> exec run_query('select * from dept where deptno = 10');
    -- Columns --
    DEPTNO - NUMBER
    DNAME - VARCHAR2
    LOC - VARCHAR2
    Row: 1
    DEPTNO : 10
    DNAME : ACCOUNTING
    LOC : NEW YORK
    PL/SQL procedure successfully completed.
    SQL>In 11g, you can create a sys_refcursor and then the DBMS_SQL package allows you to convert that refcursor into a DBMS_SQL cursor so that you can get the description of the results and do the same. This isn't available prior to 11g though.
    However_ before any of that, you should really ask yourself if there is a real need to dynamically be creating queries. There is rarely any real need to do that and if you're finding it's common in your application then this is often a sign of poor design or poorly defined business requirements (leaving the technical side to try and be "flexible" and hence leading to unmaintainable code etc.).

  • Labeling Variable Number of Plots on a Graph?

    I'm loading up an unknown number of files and graphing them. Since it can get a bit confusing, I'd like to be able to take a portion of the file name and label each plot on my graph. Since there is a variable number of graphs, I can't seem to work around how to wire the property node. There are several other things I'd like to do with the graph, but dont know if its possible or not such as having a label pop up if your cursor is over a plot.

    You are going to have to embed the reference node for the graph into a for-loop like the attached example. File names or portions thereof are built as strings and then added into the property node Plot>>Plot Name.
    I'm not sure about how to get a label to pop up if you are over the plot. You might be able to do it with some cursors and associated code.
    Attachments:
    Graph-Names.vi ‏20 KB

  • Variable number of document info record parameters

    Hi guys,
    I have a question about adding additional information to document info record.
    The situation is following:
    Our customer wants us to link original purchase order (PDF file) with it's document info record in SAP. The document itself is stored in another document management system and we have succeeded in linking this object with it's document info record in SAP.
    He also wants to have some description data stored in document info record (date, description, name, etc). One odd requirement is copying information about cost centers and costs per each cost center from fields in document management system to some fields in document info record.
    The problem is that each purchase order can have various number of cost centers and costs per each cost center!
    So, is there any possibility to define some fields in document info record to which I can store variable number of parameters (for example in one case 3 fields, and maybe in another case 1 field)?
    Any kind of information will be valuable for me!
    Thanks for help!

    Hi,
    But my next question is how can I know how much cost centers will be for some document? If I need to define number of cost centers in advance, then this solution is not very flexible. The best solution would be if I could add values to classification flexibly (for example: one time 3 values and the other time 1 value).
    :-Check box additional values in values tab of char. that will allow to enter flexible number of values any time
    The other question is about values of parameters. For each cost center I need to enter two values (cost center number, and costs for that cost center). So, for each cost center I need to add 2 values. Is that possible using classification?
    :-Create classification with chara. cost center, cost center value and check box additional values as above that will allow you to add values for cost center and cost center value.
    Anirudh.

  • Variable number of two dimensional arrays into one big array

    I have a variable number of two dimensional arrays.
    The first dimension is variable, the second dimension is always 7.
    i.e.:
    Object[][] array0 = {
    {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"},
    {"alice", "smith", 42, 160.0, "la", "bub", "[email protected]"},
    Object[][] array1 = {
    {"john", "sdfs", 34, 15.5, "a", "bl", "[email protected]"},
    {"joe", "smith", 42, 16.0, "a", "bub", "[email protected]"},
    Object[][] arrayi = ...I'm generating these arrays with a for-loop:
         for (int i = 0; i < filter.length; i++) {
              MyClass c = new MyClass(filter);
              //data = c.getData();
    Where "filter" is another array which is filled with information that tells "MyClass" how to fill the arrays.
    "getData()" gives back one of the i number of arrays.
    Now I just need to have everything in one big two dimensional array.
    i.e.:Object[][] arrayComplete = {
    {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"},
    {"alice", "smith", 42, 160.0, "la", "bub", "[email protected]"},
    {"john", "sdfs", 34, 15.5, "a", "bl", "[email protected]"},
    {"joe", "smith", 42, 16.0, "a", "bub", "[email protected]"},
    Any idea on how to accomplish this? It's blowing my mind right now.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Just brainstorming here:
    Why not put your actual data in a class and store that in a LinkedList (so you know the total number of elements for your multi-dimensional array). Then initalize your multi-dimensional array and populate it? Haven't tested the following, but thinking something along the lines of
    public class MyData {
         //data here
         public Object[] toArray() {
              //something similar to this
              return new Object[] = {"tim", "sanchez", 34, 175.5, "bla", "blub", "[email protected]"};
    LinkedList<MyData> data = new LinkedList<MyData>();
    data.add(mydata1);
    //however many times you need
    Object[][] arrayComplete = new Object[data.size()][7];
    for(int i = 0; i < data.size(); i++) {
         arrayComplete[i] = data.removeFirst().toArray();
    }Another option for knowing how many rows you would need might be using something like:
    int rows = 0;
    rows += array1.length;
    rows += array2.length;
    //etc...But is not entirely useful if you don't know how many variable arrays you have (although reflections might help if the name of the array variable is incremented systematically, someone told me earlier to avoid reflections since it could make debugging a LOT more difficult).
    Edited by: bogdana on Apr 1, 2010 10:38 AM

  • Variable number of parameters in a procedure

    Hello !
    I have a form in a procedure with dynamic inputs type "checkbox" (one checkbox by record of a table).
    The action of the form is another procedure. There is a variable number of parameters (depending on checked inputs).
    How can I do for retreiving these variable data within a single variable in my second procedure ?
    Thanks for help and sample
    null

    What u can do is use Javascript and pass all the selected checkbox Ids as a dilimited string..which u can read in second procedure and can perform appropriate action. for example if you have check box named as chk1,chk2,chk3,chk4 n so on..
    now if chk1,chk3,chk4 are checked then pass this string in the hidden field "1|3|4"which is a |(pipe) delimited string..

  • How to create line hart with variable number of data series

    Hello,
    I am student and I am completely new to Flex programming but
    I need to urgently create an app that should have a variable number
    of data series but of ame type of object.
    eg. Profits for X,Y and Z in in run while just corp X in the
    next instance.
    How can I accomodate for this in the app? can someone point
    me in the right direction I would really greatful as this project
    is really crucial for my coursework to get finished in timely
    manner.
    Thank you

    Hey,
    I'm not really sure what you want, but you should check out:
    http://demo.quietlyscheming.com/ChartSampler/app.html
    Which has a list of different types of charts in Flex and
    will hopefully help. Also check out charting from ILOG, which is
    quite good:
    http://www.ilog.com/products/elixir/

Maybe you are looking for