If statement within a for-each

I'm trying to display the contents of the field DESCRIPTION if the field CUSTOMER_TRX_TYPE='Projects Invoice'. The output is within <?for-each:G_LINE?>, but CUSTOMER_TRX_TYPE is two levels above G_LINE - can I still reference the field?
The xml hierarchy looks like:
LIST_G_TRX / G_TRX / LIST_G_LINE / G_LINE
I tried
<?for-each:G_LINE?> <?if:[../CUST_TRX_TYPE='Projects Invoice']?> DESCRIPTION <?end if?>
but that generated an error. Does anyone know if this is possible? If so, where my errors are?
Thanks,
Ed

I found the answer to my own question ... for anyone else who might be hitting this problem, I needed one more ../ to get me to the level I needed. The following worked:
<?for-each:G_LINE?> <?if:[../../CUST_TRX_TYPE='Projects Invoice']?> DESCRIPTION <?end if?>

Similar Messages

  • XSLT for-each within another for-each

    Hi All,
    My XSLT mapping needs to pick a field(BOL) from the Header and the using that, search the Items node for the matching BOL and generate the output accordingly.
    My current XSLT is as follows(not the entire program, just the snippet)
         <xsl:for-each select="ns0:Messages/ns0:Message1/ns1:MT_Header/Header">
                          <xsl:param name="search"><xsl:value-of select="bol"/></xsl:param>
         <xsl:for-each select="ns0:Messages/ns0:Message2/ns1:MT_Items/Item[BOL=$search]">
                  <Output>
                     <BOL_ITEM><xsl:value-of select="BOL_ITEM"/></BOL_ITEM>
                </Output>     
         </xsl:for-each>
         </xsl:for-each>
    The following code works correctly(without the outer for-each and with hardcoding)
                             <xsl:param name="search">100</xsl:param>
         <xsl:for-each select="ns0:Messages/ns0:Message2/ns1:MT_Items/Item[BOL=$search]">
                  <Output>
                     <BOL_ITEM><xsl:value-of select="BOL_ITEM"/></BOL_ITEM>
                </Output>     
         </xsl:for-each>
    So its the for-each within another for-each that does not work . Is there some syntax problem ? Or another way to achieve this in XSLT?

    Closing this thread

  • Unable to set a new value in an extended property from within a For Each Loop

    Setting a new value in an extented property fails when the property is dereferenced within a For Each loop usin the item  iterator. However, if you use the First or Last Iterators from the Find Targets activity works fine.
    The error message is : "Setting a value for this object type is not allowed"
    I believe this is a defect, can you please confirm

    Looks like a bug that needs to be reported.
    While we are figuring out the issue you can work around the bug.
    Add another "Find Targets" inside the loop, and use the ID of the current item in the loop to find the target (again) by ID.
    And then use Set Variable on the target that was just found...
    I know... Not an ideal workaround, so please open a Severity 4 bug for this.

  • Start:Body within a For-Each

    I have a report where I have some fields at the top of the page that I want to repeat on every page, so I added a <?start:body?> under those fields so that it would repeat the information above. This report has been working great.
    The problem is that now I need to repeat the whole report for multiple employees. I added another for-each above the <?start:body?> and it is giving an error. Is there a way around this?
    For example, what I am trying to do is this:
    <?for-each:G_STUDENTS?>Employee Name
    HEADER INFO
    FIELD_X
    <?start:body?>
    <?for-each:G_CLASSES?>
    CLASS INFO
    <?end for-each?>
    <?end:body?>
    <?end for-each?>
    and repeat for multiple employees....
    thanks in advance!
    Rob
    Edited by: Rob M on May 17, 2011 3:54 PM

    i get the following (sorry for not formatting it correctly..not sure how to make it look nice):
    ConfFile: C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\config\xdoconfig.xml
    Font Dir: C:\Program Files (x86)\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    Template: H:\Garland ISD\XML Publisher\PRD\GISD Learning Management Transcript\gisdolmtxmlr.rtf
    RTFProcessor setLocale: en-us
    FOProcessor setData: H:\Garland ISD\XML Publisher\PRD\GISD Learning Management Transcript\GISDOLMTXML loc data.xml
    FOProcessor setLocale: en-us
    oracle.apps.xdo.template.fo.area.NoAvailableAreaException: Not enough rendering area. Please look into the incomplete output file for cause.
         at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
         at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
         at oracle.apps.xdo.template.fo.elements.FormattingEngine.createNewPage(Unknown Source)
         at oracle.apps.xdo.template.fo.elements.FormattingEngine.startLayout(Unknown Source)
         at oracle.apps.xdo.template.fo.elements.FormattingEngine.run(Unknown Source)
         at oracle.apps.xdo.template.fo.FOHandler.endElement(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(Unknown Source)
         at oracle.apps.xdo.common.xml.XSLTMerger.startElement(Unknown Source)
         at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
         at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
         at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
         at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
         at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:206)
         at oracle.apps.xdo.template.fo.FOProcessingEngine.process(Unknown Source)
         at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
         at RTF2PDF.runRTFto(RTF2PDF.java:629)
         at RTF2PDF.runXDO(RTF2PDF.java:439)
         at RTF2PDF.main(RTF2PDF.java:289)
    thanks,
    Rob

  • Calling a Function Within a For-Each in Powershell

    Error:
    Unexpected token 'in' in expression or statement.
    At :line:1 char:22
    + ForEach-Object ($i in  <<<< $fs_size_info) { $i.Name.Name, GetGB($i.Sum)  }
    Code:
    foreach ($i in $fs_size_info) { $i.Name.Name GetGB($i.Sum) }
    If I omit the function from inside this foreach, it works perfectly, and I can access $i.Sum within the foreach as well. The problem arises when I try to call a function from inside the foreach. GetGB simply returns a more readable format e.g. GetGB(1024)
    will return "1 K" etc...
    I don't understand what I'm doing wrong, unless you cannot call a function inside a foreach statement.... am I missing something?
    Thanks

    The code you've posted and the error message don't seem to go together, unless the line before that "foreach" keyword happens to have ended with a pipe character.  There's a difference between how you use the foreach statement (help about_Foreach)
    and the ForEach-Object cmdlet (help ForEach-Object).
    Either way, it looks like inside the loop body, you've got two statements:  ($i.Name.Name) and (GetGB($i.Sum).  Those statements need either a line break or a semicolon between them.

  • Custom sorting within "for-each-group:current-group"

    Hi, I need some help in doing a custom sort within a "for-each-group:current-group". My formatting is in a table format but I'm not sure how to post a table here so I'm just arranging the column details out as it would look in a table. I have a column on the left for the YEAR and a second column on the right for the DESCR. Under the DESCR column I've inserted a nested table with four columns: SUBJECT, CATALOG_NBR, DESCR250 and GRADE.
    COLUMN 1:
    <?for-each-group:row_table;./ YEAR?><?sort: YEAR;'ascending';data-type='text'?><?YEAR?>      
    COLUMN 2:
    <?for-each-group:current-group();./DESCR?><?DESCR?>
    NESTED TABLE (with 4 columns):
    +<?for-each:current-group()?><?SUBJECT?><?CATALOG_NBR?><?DESCR250?><?GRADE?><?end for-each?>+
    <?end for-each-group?> <?end for-each-group?>
    I'm able to sort by YEAR in the "for-each-group" on the left column. But I also want to do a custom sort on DESCR in the right column.
    I've seen this blog on custom sorting by Vetriselvan: http://winrichman.blogspot.com/2009/09/custom-dynamic-sort-in-bi-publisher.html and I tried inserting this sort below after <?for-each-group:current-group();./DESCR?> but I get an error message.
    <?sort:(number(DESCR='Status')*1)+(number(DESCR='First Semester')*2)+(number(DESCR='Second Semester')*3);'ascending';data-type='number'?>
    I've also seen this thread: Re: Sort within group and tried inserting <?for-each:DESCR?> before the sort (as below) - this time I can preview the results, but it is not sorting as required.
    <?for-each:DESCR?><?sort:(number(DESCR='Status')*1)+(number(DESCR='First Semester')*2)+(number(DESCR='Second Semester')*3);'ascending';data-type='number'?>
    Can anyone help me custom sort the DESCR column? I'm using Template Builder for Word version 5.6 build 45. Thanks in advance for any help!

    Hi Vetsrini,
    I tried adding <?sort: ./DESCR;'ascending';data-type='text'?> after <?for-each-group:current-group();./DESCR?> but I'm getting an error message.
    The DESCR values are below and I'm trying to sort them in the following order.
    STATUS
    SUMMER SEMESTER
    FIRST SEMESTER
    AUTUMN SEMESTER
    WINTER SEMESTER
    SECOND SEMESTER
    SPRING SEMESTER
    Because I need them in the above order, I can't use ascending or descending, and instead need to use a custom sort order. Do you know how I can go about creating a custom sort order?
    Thanks!

  • For each loop not working

    My trace statements inside my for each loop won't show.
    Please someone check my code. I"m getting no errors in flex
    builder. When i debug all vars are holding prober data. Thanks so
    much

    "essa tkinen" <[email protected]> wrote in
    message
    news:gr27rt$3sb$[email protected]..
    > yes there is data there a commas delimited list of
    keywords that are
    > catagorys. the selectedCatArray holds at list one
    element. I want to
    > return true if element is in that list
    For one thing, you're going to exit the function in the first
    iteration,
    because you return the result inside the loop. Return
    immediately exits the
    function. For another, I'd be tempted to switch it to
    something more like
    this:
    for (var i = 0; i<_item.cats.length; i++) {
    var iCat=item.cats
    //do your stuff here
    I have had really bad luck getting for each in to work the
    way I think it
    should.
    HTH;
    Amy

  • For Each atoms

    Hello Experts:
      Is there a way to update local variable within the for each loop. I would like to update failure / success on DI object within the loop activity. Thank You!

    Hello Experts:
      Is there a way to update local variable within the for each loop. I would like to update failure / success on DI object within the loop activity. Thank You!

  • OSB:Publish to business service with for each in osb proxy message flow

    Hi,
    I have an external application that will make a call to my web-service and post a message to my queue "A" and i need to model my osb component such that it picks the message from that queue " A"and posts it to another queue "B". All this is done without any BPEL involved.
    for publishing the message i have created a business service that publishes a msg to the queue A and my proxy service is modelled such that it subscribes to this same queue A and publishes the msg to another business service (that posts it to a queue B).
    Everything is working fine but i have an issue in modelling my proxy message flow. If an external application sends a bulk msg i need to post the message one by one to my queue B. I have used for-each and Publish to BS but the msg doesn't get posted one by one. i know i am missing something please help me out.
    SOA Suite Version - 11.1.1.3

    Are you sure that your for-each definition is correct? Does the flow within the for-each get executed multiple times?
    You can check this by logging the variable to which you assign the message in the for-each. Don't forget to put the log level to Error, so you're sure that it's logged.
    Let's say you get a list of persons like the following xml in a variable personList
    <Persons>
    <Person>Glenn</Person>
    <Person>Prasanth</Person>
    </Persons>
    Your for-each definition should be the following.
    For each variable: person
    XPath: +./Person+
    In Variable: personList
    You don't mention the Persons element in the XPath expression since it is the root element of the XML. The root element is represented by . (dot).
    In the for-each, the variable person can be used like any other variable.

  • Using a different default component state within each page state

    I am using a custom component in multiple page states but would like to have a different default state (for the same custom component) within each page state.
    Is there anyway to use a different default component state within each page state .
    When I change the default state at a component level it seems to go across all my page states.  Any solutions?
    Thank you

    I guess I can just add that interaction for that component!
    I think my brain is just catching up

  • Set exported resolution for each image within InDesign

    I'm generating a document in InDesign destined only for the screen (as a PDF) and I'm wondering whether in CS6 the user can set the exported resolution separately for each image. i.e click on a image and set the resolution for that image. Reason: to allow end-viewers to zoom in on certain images and retain quality.
    And while I'm on the subject of changing resolution, a few years ago someone wrote a script for me (in response to a post), that when you clicked on an image within InDesign, resampled the original to 300 dpi, saved it, and made the necessary adjustments in InDesign so the image stayed the same size.
    Can CS6 do that? Or do I need to dig up the old script?

    > ... destined only for the screen (as a PDF) ...
    The developers of PDF will thank you for that statement!

  • GROUP BY - Is there a way to have some sort of for-each statement?

    Hi there,
    This discussion is a branch from https://forums.oracle.com/thread/2614679
    I data mart I created for a chain of theatres. The fact table contain information about ticket sales, and I have a some dimensions including DimClient and DimTime.
    Here is an example of each table:
    FactTicketPurchase
    TICKETPURCHASEID
    CLIENTID
    PRODUCTIONID
    THEATREID
    TIMEID
    TROWID
    SUMTOTALAMOUNT
    60006
    2527
    66
    21
    942
    40
    7
    60007
    2527
    72
    21
    988
    36
    6
    60008
    2527
    74
    21
    1001
    40
    6
    60009
    2527
    76
    21
    1015
    37
    6
    60010
    2527
    79
    21
    1037
    39
    6
    DDL for FactTicketPurchase
    CREATE TABLE FactTicketPurchase(
    TicketPurchaseID NUMBER(10) PRIMARY KEY,
    ClientID NUMBER(5) CONSTRAINT fk_client REFERENCES DimClient,
    -- ProductionID NUMBER(5) CONSTRAINT fk_prod REFERENCES DimProduction,
    -- TheatreID NUMBER(5) CONSTRAINT fk_theatre REFERENCES DimTheatre,
    TimeID NUMBER(6) CONSTRAINT fk_time REFERENCES DimTime,
    -- TRowID NUMBER(5) CONSTRAINT fk_trow REFERENCES DimTRow,
    SumTotalAmount NUMBER(22) NOT NULL);
    DimClient
    CLIENTID
    CLIENT#
    NAME
    TOWN
    COUNTY
    2503
    1
    LEE M1
    West Bridgford
    Nottingham
    2504
    2
    HELEN W2
    Hyson Green
    Nottingham
    2505
    3
    LEE M3
    Lenton Abbey
    Nottingham
    2506
    4
    LORA W4
    Beeston
    Nottingham
    2507
    5
    SCOTT M5
    Radford
    Nottingham
    2508
    6
    MINA W6
    Hyson Green
    Nottingham
        ..cff.
    DDL for DimClient
    CREATE TABLE DimClient(
    ClientID NUMBER(5) PRIMARY KEY,
    Name VARCHAR2(30) NOT NULL);
    DimTime
    TIMEID
    FULLDATE
    YEAR
    SEASON
    MONTH
    MONTHDAY
    WEEK
    WEEKDAY
    817
    02-MAR-10
    2010
    Spring
    3
    2
    9
    3
    818
    03-MAR-10
    2010
    Spring
    3
    3
    9
    4
    819
    04-MAR-10
    2010
    Spring
    3
    4
    9
    5
    820
    05-MAR-10
    2010
    Spring
    3
    5
    9
    6
    821
    06-MAR-10
    2010
    Spring
    3
    6
    9
    7
    822
    07-MAR-10
    2010
    Spring
    3
    7
    9
    1
    DDL for DimTime
    CREATE TABLE DimTime(
    TimeID NUMBER(6) PRIMARY KEY,
    Year NUMBER(4) NOT NULL,
    Season VARCHAR2(20));
    I have the following analysis request to perform on this data mart:
    Top 5 clients by value of ticket sale for each season
    For this requirement I came up with the following query:
    SELECT * FROM
    (SELECT FacTIC.ClientID, DimCLI.Name, SUM(SumtotalAmount) SumTotalAmount, DimTIM.Season
    FROM FactTicketPurchase FacTIC, DimClient DimCLI, DimTime DimTIM
    WHERE FacTIC.ClientID = DimCLI.ClientID
    AND FacTIC.TimeID = DimTIM.TimeID
    AND Season = 'Spring'  AND Year = 2010
    GROUP BY Season, FacTIC.ClientID, DimCLI.Name
    ORDER BY Season ASC, SumTotalAmount DESC)
    WHERE rownum <=5;
    As you can see, in line 06 of the above query, I am explicitly specifying the season for the query to return.
    However what I would like to do is just one query that could autocratically go through the seasons and years available in the time dimension in a fashion similar to a FOR-EACH statement. This way, if we get more years added to the time dimension, we wouldn't have to amend the query.
    Is this possible?
    Regards,
    P.

    I think I fixed it!
    The trick was to look into the r_num value. As soon as I added it to my query I started to see how r_num was being calculated and I realised that I had to add Season to my partition, right after Year.
    SELECT Year, Season, TotalAmount, Name
    FROM (
       SELECT   DimCLI.Name
       ,        DimTIM.Year
       ,        DIMTIM.Season
       ,        SUM(FacTIC.SumTotalAmount) TotalAmount
       ,        RANK() OVER (PARTITION BY Year, Season
                             ORDER BY SUM(FacTIC.SumTotalAmount) DESC
                            ) AS r_num
       FROM     FactTicketPurchase FacTIC
       ,        DimClient DimCLI
      ,         DimTime DimTIM
       WHERE    FacTIC.ClientID = DimCLI.ClientID
       AND      FacTIC.TimeID = DimTIM.TimeID
       GROUP BY DimTIM.Year
       ,        DimTIM.Season
       ,        DimCLI.Name
    WHERE r_num <= 5 -- Need to amend this line on my data sample to show 2 rows.
    ORDER BY Year, Season, TotalAmount DESC;
    Looking at my data sample, I got the following:
    YEAR
    SEASON
    TOTALAMOUNT
    CLIENTID
    2010
    Autumn
    29
    2504
    2010
    Autumn
    26
    2503
    2010
    Spring
    25
    2503
    2010
    Spring
    14
    2506
    2010
    Summer
    26
    2506
    2010
    Summer
    26
    2504
    2010
    Winter
    28
    2503
    2010
    Winter
    26
    2506
    2011
    Autumn
    23
    2506
    2011
    Autumn
    14
    2503
    2011
    Spring
    25
    2505
    2011
    Spring
    13
    2503
    2011
    Summer
    21
    2505
    2011
    Summer
    14
    2503
    2011
    Winter
    19
    2505
    Now, looking at my real data, (considering the top 5 rows, not the top 2), I got:
    YEAR
    SEASON
    TOTALAMOUNT
    NAME
    2010
    Autumn
    141
    BUSH M225
    2010
    Autumn
    140
    DIANA W66
    2010
    Autumn
    136
    HANA W232
    2010
    Autumn
    120
    DIANA W220
    2010
    Autumn
    120
    WILSON M459
    2010
    Spring
    137
    DAVID M469
    2010
    Spring
    125
    ALEX M125
    2010
    Spring
    124
    PETER M269
    2010
    Spring
    115
    ZHOU M463
    2010
    Spring
    114
    TANIA W304
    2010
    Summer
    138
    JANE W404
    2010
    Summer
    105
    MINA W8
    2010
    Summer
    97
    DAVID M275
    2010
    Summer
    96
    CLINTON M483
    2010
    Summer
    93
    ANNA W288
    2011
    Spring
    12
    LUISE W20
    2011
    Spring
    7
    ANNA W432
    2011
    Spring
    7
    LEE M409
    2011
    Spring
    7
    CHRIS W274
    2011
    Spring
    7
    HELEN W136
    2011
    Spring
    7
    LILY W114
    2011
    Spring
    7
    LUISE W348
    2011
    Spring
    7
    LIU M107
    2011
    Spring
    7
    VICTORY W194
    2011
    Spring
    7
    DIANA W240
    2011
    Spring
    7
    HELEN W120
    2011
    Spring
    7
    LILY W296
    2011
    Spring
    7
    MATTHEW M389
    2011
    Spring
    7
    PACO M343
    2011
    Spring
    7
    YANG M411
    2011
    Spring
    7
    ERIC M101
    2011
    Spring
    7
    ALEX M181
    2011
    Spring
    7
    SMITH M289
    2011
    Spring
    7
    DIANA W360
    2011
    Spring
    7
    MATTHEW M63
    2011
    Spring
    7
    SALLY W170
    2011
    Spring
    7
    JENNY W258
    2011
    Spring
    7

  • Problem For/Each statement (or the problem is the MouseListener...)

    Hi guys,
    I'm making a program in java for school.
    Now I have this:
              for(Stap2TrampolineModel trampoline : lijstTrampolines)
                   trampoline = new Stap2TrampolineModel(0,215,100,"Poing",lijstKinderen); //model
                   trampolineView = new Stap2TrampolineView(trampoline); //view
                   trampolineController = new Stap2TrampolineController(trampoline, trampolineView); //controller
                   trampolineView.setBounds(trampoline.getXInvoer(),trampoline.getYInvoer(),trampoline.getFormaat()+1,20);
                   add(trampolineView);
                   repaint();
    and in the mouselistener this:
    public void mouseClicked( MouseEvent e )
              System.out.println(lijstTrampolines.size());
              // Onderzoek of met de rechterknop is geklikt
    if( e.isMetaDown() )
         // x = e.getX(); (for later needs)
    //y = e.getY(); (for later needs)
    lijstTrampolines.add(trampoline);
    repaint();
    The program should display a "trampoline" when I click...but it doesnt. It is added to the list, because I can see that in the console because of the System.out.println
    But it doesn't show the display I want. When I delete the for each statement, it does show the "trampoline". So the mouselistener works (it gets added when I click) and the arraylist works (it shows that in the console), but the for each statement doesnt work...
    Anyone knows how to solve this problem?

    Where is this foreach loop located? In inialisation presumably. But that's over and done with when your mouseListener is called. I'd guess your list is empty when the loop is called, and it does nothing.
    Your mouse listener, when it adds a trampoline must also add a trampoline view object. And the repaints don't do you any good, use revalidate() after adding a trampoline view to recalculate the layout.

  • "for each..." statement

    I just wonder if java support "for each" statement? such as, I don't know how many items and names in a array, so I like to list out all. then how to do it?
    for example, in asp:
    '----------codes start-----------
    for each item in session.contents
    response.write item &"="& session(item)
    next
    '-----------codes----------------
    how can I change this code to Java, so I can get each session name?
    thank you

    hi, i don't know if you have had answer to your problem allready, so i provide you with some manual pagess that wil be helpful.
    ...i don't know if you have found your way to J2EE APi allready...
    HTTPSession:
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSession.html
    and there you will find method getAttributeNames(), from there you may work with while(attribNamesEnumeration.hasNext()) { ... }
    but as you ask something that might as well be from PHP, then i suspect that you're dealing with JSPs, and therefore you could be wanting help not about session, but HttpServletRequest:
    http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html
    and there you see methods (not directly in this class, but in its superclass -- sorry if that's confusing, important thing is taht you may use those methods) like:
    getParameter(String name)
    getParameterMap()
    getParameterNames()
    getParameterValues(String name)
    there's no point in copying that api here.... so go check it out yourself...
    put basicaly you may use getParameterNames() to get all names of parameters that are sent with this request, and in case any of parameters has many values (like.in.this/request.html?param=value1&param=value2&param=value3) you could use getParameterValues() method to get all values of that parameter
    HTH

  • Variable Use in For-Each statement

    Hello Gurus-
    I am having an issue using a variable i've created in a for each statement. Here is the code i'm using
    My objective is to create a variable based on the kind of invoice. If the invoice is a proof or reprint, one copy should be printed. If it's a final invoice, I need two copies.
    <?xdoxslt:set_variable($_XDOCTX, 'x', 0)?>
    for-each<?if: Print_Additional_Header_Text_ID238='PROOF'?><?xdoxslt:set_variable($_XDOCTX, 'x', 1)?><?end if?>
    <?if: Print_Additional_Header_Text_ID238='REPRINT'?><?xdoxslt:set_variable($_XDOCTX, 'x', 1)?><?end if?>
    <?if:not ( Print_Additional_Header_Text_ID238)?><?xdoxslt:set_variable($_XDOCTX, 'x',2)?><?end if?>
    <?xdoxslt:get_variable($_XDOCTX,'x')?><?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
    for-each is the loop i'm using to repeat sections of the invoice.
    When I run the preview with the last for-each print, i get an error that says "variable not defined:'x' "
    But when i remove the last for each the correct variable, 1 or 2, will show in the invoice.
    My question is: How can I use the variable 'x' in <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,$x,1)?>
    TIA
    Darius
    Edited by: 852460 on May 24, 2011 8:31 AM
    Edited by: DEK17 on Jul 20, 2011 1:15 PM

    Probably, this will help
    http://winrichman.blogspot.com/search/label/multiple%20copy
    Try
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,get_variable($_XDOCTX, 'x'),1)?>
    or
    <?for-each@section:xdoxslt:foreach_number($_XDOCTX,1,xdoxslt:get_variable($_XDOCTX, 'x'),1)?>

Maybe you are looking for

  • Can iphoto's library be located on an external HD?

    I am a photographer and have many different programs I use for editing and managing my files. I have no plans to move to iPhoto as a primary/only menas of managing my photos. However, I have recenlty gotten an AppleTV and would like to share/show my

  • Class.forname (help please)

    Hello, I would like to load a class with class.forname. BUT, I just know the package and the path to the class. This class its not on class-path... What I know is: class: myClass package: org.java location: c:\myClases current class path: c:\myClassP

  • Compaq Presario 2586US laptop - hard drive upgrade

    I recently took a chance and bought 2 "parts only" Compaq Presario 2500 series laptops off Ebay and was able to make a single working PC with the motherboard from the 2586US being the motherboard I used.  I did not have a hard disk, so I bought a Sam

  • Exchange Server 2013 email rejections from free ISP accoounts

    We have an Exchange 2013 box, and we are getting random mail no deliveries to mostly free email isps (gmail, hotmail, yahoo, and aol) where errors are like: Generating server: OPCSEX.opcs.local Receiving server: mailin-04.mx.aol.com (64.12.91.196) [e

  • How do I delete duplicate pictures from my iPhoto library?

    Is there a quick and easy way/program to do this?