Outputting records in sequence

I have records in my DB that I would like to rotate and display one at a time each time the query is run.  (in sequence, NOT random).
I can't seem to wrap my head around a simple solution for this. Can anyone throw me a bone?

Store a counter somewhere, depending on if you want it in sequence at the application scope level across user sessions or at the session scope layer where each user session starts at 1, 2, 3...
Then use modulo arithmetic on the counter and total number of records to pick the record to display.
SESSION Example:
<cfparam name="session.myCounter" default="0" />
<cfquery name="myQuery" ...>
            select someColumnName... from someTable
            order by someColumnName
</cfquery>
<cfif myQuery.recordCount>
            <cfset variables.myRecordID = session.myCounter % myQuery.recordCount />
            <cfset session.myCounter = session.myCounter + 1 />
            <cfoutput query="myQuery" maxrows="1" startrow="#variables.myRecordID+1#">
                        <!--- +1 because modulo is zero based, CF queries are one based --->
                        #someColumnName#...
            </cfoutput>
</cfif>

Similar Messages

  • Issue when changing a PO: it creates a new output record automatically

    Hello,
    The goal is to prevent that a new output record is automatically attached to a purchase order after a change has occurred.
    Current situation:
    Create a PO for holding and an output record is created for output type ZHP1.
    Release PO.
    Print the PO in ME9F.
    Change the condition record in MN05 and change the language of the print to a different language than the one of the supplier.
    Change the PO by adding some header text, the system adds a second output on the purchase order in the language of the cond record.
    This should not happen.
    Any idea how to achieve this goal rather via customizing than new implementation/changing the SAP standard code!
    Thank you in advance.
    Aydin

    Hi, I'm working with Aydin on this issue.
    It creates the second message on the PO and if processed via ME9F then it prints.
    But we dont want even that the second output gets created.
    We do not work with version management so changes to PO do not create second message.
    This second message comes up because language code has been changed in MN05 (one time change) after the first print.
    System sees that first message on PO is with language A and now condition record is with lang B.
    So If I change any little thing on the PO just to trigger message redetermination, it attaches a second output in the lang B. 
    If I dont change language code in MN05 and I still do my little change on PO, then it does not attach a second output message (which is good for us)
    I thought the only way out is to write a requirement program that would check that if a message already exists on the PO for that output type then dont create a second one. What do you think?
    Marc
    Edited by: mmlafe on Jan 3, 2012 5:02 PM

  • Restriction in the output records

    Hi Experts,
    I have created a Quick view ( SQVI ) for two tables. But the output records restricted to 100. I could not find the option to remove this anywhere. Can any one help on this ?
    Thanks in advance
    Srinivas

    Hi,
    Assign infoset to your use group and try once.
    As query functionality is based on InfoSets, define an infoset and proceed you querry.
    with regards,
    mahesh.

  • Output 23.98fps sequence to 1080i (using upconverter hardware)

    Here's a puzzler that reaches a bit outside of FCP...
    I've edited a feature film that was shot and edited at 23.98fps DV resolution (from the Panasonic 24p cameras.)
    My final master will be HD, 1080i/59.94. I'm accomplishing the upconvert by outputting my DV sequence out to DV tape, then running the tape through an Terranix (not sure spelling) upconverter box that's doing a nice job of squeezing every last drop of image quality.
    This is important: for upconversion, I have two kinds of footage. 4x3 aspect scenes shot with a Panasonic DVX-100A. And anamorphic squeezed footage shot by the HVX-200. To attain maximum quality, I have divided them into two submasters. This way, the anamorphic footage can be blown up less than the 4x3 footage and prosper as a result.
    My plan is to cut back together the master from the scenes on the two submasters - kind of like A & B rolls, if you want to wax nostalgic.
    The problem is that when I start editing the material, I get ghost frames - most noticeable when one field is black. So some scenes run a frame short when I must excise the ghost frames.
    This reminds me of cutting 24fps film transferred to 29.97fps videotape - so I'm convinced it's a 24/30 frame issue. I'm not sure what the best solution is - whether to put handles on my scenes and spend a lot of labor re-combining them, or output to 1080p/23.98 or some other solution.

    If I were you I'd try to make this simpler. I'd upconvert the 4:3 stuff to anamorphic DV in FCP. Then use the Terranex to blow up the anamorphic sequence as one long sequence. Or if you output your sections to 1080p/23.98 then you can have an HD 24p master. Just add the pulldown during final output to your 1080i/59.94 tape.
    You're adding 2:3 pulldown to the 23.98 footage, so at the end of some sequences you'll get a frame that's one field black and one field picture if they fall at that point in the pulldown cadence. This has nothing to do with shooting 24pa. Assuming you removed the advanced pulldown correctly, there's no difference between footage shot with regular pulldown vs. advanced pulldown.

  • Ho to add output record to PO mannually

    Hi All,
    When i create PO, it will not have output record for printing the PO in ME9F, so I need to maintain output record to PO in ME23N transaction (messages). How can i add the output record mannually to PO. Why it will not coming automatically when i create a PO?
    Thanks,
    Subbu.
    Edited by: Subramanyam Sesetty on Feb 18, 2009 11:51 AM

    Hi Subramanyam,
    follow the below steps to add output type in PO:
    1. use T.code ME22 (If PO is created already) or ME21.
    2. Enter the PO number and press Enter.
    3. goto Header --> Messages
    4. Enter the following values.
    Output type  with Condition Type
    Medium with Print Output
    PartFunc with  Partner Type (VN for Vendor or SH for ship to party etc.)
    Partner  with  Partner Number
    Language by Specify language
    5. now press on Further Data  and and change Requested Processing as Send Immediately.
    6. Finally Save the PO Changes.
    Regards,
    SB.
    Edited by: sunil bodda on Feb 18, 2009 12:54 PM

  • Multiple output records for delivery type access order sequence

    Hello,
    This is a question about output delivery type for outbound deliveries.
    I have created one delivery type YF and two output condition types YDL1  and assigned access sequence (by sales org/customer) and YDL2 (by  shipping point) in NACE V2 shipping. I have also created their corresponding condition records: salesorg/cust and shipping point in VV21.
    When I created my outbound delivery YF from sales order and saved it. System finds both output condition types. First YDL1 and then YDL2 as expected because condition records have been maintained. However, I need to change this order so that YDL2 is the default one and YDL1 is found next.
    Could somebody help me how do I change this order?
    Thank you in advanced.

    Hello,
    what do you mean with
    I need to change this order so that YDL2 is the default one
    When two or more output types are determined, they have the same "rank".
    If you mean that you want to sort the output types to have one printed before the other one, please refer to point 3. of OSS Note 960611
    https://websmp130.sap-ag.de/sap(bD1pdCZjPTAwMQ==)/bc/bsp/sno/ui_entry/entry.htm?param=69765F6D6F64653D3030312669765F7361…
    Best regards,
    Andrea

  • Output type - Access sequence

    Hi,
    I have created a output type for VF02 and my requirement is to restrict the output type to only certain company codes.
    I have created a access sequence with table 502 and assigned this to the output type and also maintained the condition records.
    But still I see that the output type is getting created for all company codes..Am i missing anything here.
    Please let me know.
    Regards
    Praneeth

    Hi,
    If company code field is not available in condition table then search in OV24 T code from their you can take, it is called allowed field catalog.
    If that field is not available their also then check below document and ask your abaper to fallow this process below and add that field then you can see this field in OV24 and from that you can use this field to crate condition table
    In SAP condition records store the pricing values. These records are stored in condition tables. Condition tables name has three digits. From 1 to 500 are reserved by SAP name space and from 501 to 999 are given to customer space. In the actual database a persistent data base table is created with u201CAu201D prefixed to the table number .i.e. condition table 980 creates a table with name A980.
    During the condition table creation required fields can be selected. Only the fields present in the field catalogue are available for selection in the condition table. Fields present in the KOMG table can be added to the field catalogue. By default SAP does not add all the fields of KOMG to field catalogue. KOMG table is a union of KOMP, KOMK tables. KOMK table contains the header information of the document (Sales order or Billing), KOMP contains item level information of the document (Sales order / Billing). New fields can be added to the KOMP, KOMK structures. To add the new fields to these structures, an append structure should not be created. To add a field to KOMP structure, field should be added to KOMPAZ structure, which is an include in KOMP structure. Similarly fields should be added to KOMKAZ structure.
    If it is required to create a condition table with a custom field the following steps should be followed.
    A.Add the field in KOMKAZ or KOMPAZ structure. If the field is at the header level, add the field to KOMKAZ, and if the field is at the item level add to KOMPAZ structure. This step should be done SE11 transaction.
    B.Activate the structure.
    C.Add the new field to field catalog.
    D.Create the condition table.
    Adding the field to field catalog and condition table creation can be done VOK0 transaction.
    At run time the custom field should be filled with the appropriate value. To to this the following user exits should be used.
    USEREXIT_PRICING_PREPARE_TKOMK in RV60AFZZ .
    USEREXIT_PRICING_PREPARE_TKOMP in RV60AFZZ.
    Below is an example to add sales representative , who is a partner at item level to KOMP structure.
    1. Go to Se11, and add the field WWSR1.
    2. Open the program RV60AFZZ using SE38 transaction.
    3. Add the field to field catalog. To do this go to VOK0 transaction. Then environment ? condition table ? field catalog.
    4. Create the condition table. To do this goto VOK0 transaction. Goto environment-> condition table create. Enter the condition table number 980 .
    Once the condition table is created, this table can be used in the access sequence. Access sequence is assigned to the condition type. Condition type is inserted in the required pricing procedure. Condition records can be created in VK11 transaction. All the condition records are created with reference to the condition type. As the condition type is linked to access sequence, and access sequence to condition table, system displays all the condition table assigned to access sequence , in the initial screen. User should select one table, and enter condition records.
    for more detail check http://www.magnatraining.com/sap-sd-pricing-how-to-add-custom-fields-to-a-condition-table/

  • When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb.But the output records is originally 4000 records. When copy to new excel it is showing 3.5 mb only. Does anyone knows the answer for this issue?

    When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb. The records contained in excel file is 4000 records. When taking the excel records and copy to new excel file the excel file size is 3.5 mb only.Why does the oracle software generates 20mb file?
    Does any one knows the answer please advice?

    Hello,
    This issue is because the Excel output from BI Publisher is MHTML (XML Publisher generates XHTML) not binary .xls.
    MHTML and XHTML are more verbose formats than binary .xls.
    It will be large because the current Excel output is just an HTML and not compressed like PDF. Please use the workaround (save it as .xls file).  This is a known limitation of RTF layout templates.
    BI Publisher Enterprise has a new feature True Excel Templates. The layouts generate binary Excel output.
    Excel Output File Size Generated By BI Publisher is Very Large (Doc ID 760437.1)
    Bogdan

  • SQ01 - SAP List Viewer - Ability to get the count of the output records

    Hello All,
    I have a problem with the SAP List Viewer output for an SAP Query.
    I have created a SAP query (SQ01) for a table. Its a basic query that queries on just one table (VTBFHA)
    When I run the query, for the output in the SAP List Viewer (ALV) format, Could anyone kindly help me figure out how to get the count of the number of records displayed in the output?
    For Eg: when we run the T code SE16, It gives us the number of records displayed in the output.
    Similarly, does anyone know if there is a way I could display the count of the number of records displayed in the output of the SQ01 query?
    I have tried checking the "Counter" in the basic list tab, but it does not give me the count.
    Any help will be greatly appreciated
    Thanks
    Subhani

    Yes there is a solution. Follow these steps
    Select your query
    Hit the button InfoSet Query
    Go to Edit->Settings->
    Check the box "Count in the Output list" in the Output tab
    Hit Save
    In pop up box select the user group
    hit enter
    Hit the back arrow (F3)
    now Execute the query
    You should be able to see the count in the output.
    The count will appear on the right most column of the output. If it does not go to the "Change layout" option and make sure it is part of the "Displayed columns list".
    Regards

  • Outputting Records To Table

    I am trying to output some huge images. The query returns up
    to 6 records depending on what the user sets up, the images are so
    big though that I only want to return to images on each row. The
    images could also have a blurb and a price associated with them.
    That would mean for each record it could be 3 rows, 2 columns. I
    guess what I am asking is how do I set this up where after 2 images
    are displayed to a 2 column table a new row is automatically
    inserted? My current code is attached. However if anyone could tell
    me how to do this I would appreciated it. I just need to know how
    to force a new row after 1 row and 3 columns is displayed.
    Thanks.

    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=1&catid=3&threadid=13 91099&enterthread=y

  • Downloading a recording with the "output/recording.zip?download=zip" URL...

    I wanted to know if anyone else has had issues with downloading recordings with this extention lately.  I’m having a problem downloading our recordings as a zip. I’m sending you the screen shot of the recording playback after having used the zip option (http://lacoe.adobeconnect.com/p61oik8wy0m/output/2011welcome.zip?download=zip). Everything from the recording shows up fine except for the content that was in the main share pod. This pod contained the PPTs and images that were used during the presentation.
    Everything showed up fine when I tried the “Make Offline” option. Though this was the case, I don’t wish to use this method because 1) its painfully slow and 2) the resulting recording (.flv) is of very poor quality.

    When you download the files with that query string it pulls down the files Connect uses to recreate the meeting. Since Connect doesn't record the session in a traditional video file, you don't get everything in that zip file. If you look in the XML you will see that it calls to the content on the server (http: //lacoe.adobeconnect.com/pjan30ng0 for example). This is how Connect keeps the interactivity of the content and makes it play like you are in the live session (less the chat function).
    The shot you have above is indicitive of a recording that you moved to a different Connect account, so the call to the content is now a broken link, and that is why it never resolves. When you do an offline version you are making a video file of the recording and thus don't need to call to the content.

  • Cannot connect VI Output Terminal to Sequence Context

    I am unable to wire an output terminal of a VI to a sequence context variable. In the Edit Labview VI Call screen on teststand the output is always set to false. The f(x) button on the right does not show for this specific output. Attached is a snapshot of the screen. The output I am interested in is boolean called End Test.
    Any word on why this is happening will be appreciated.
    Thanks
    Sam
    Attachments:
    Pic.doc ‏63 KB

    Hi,
    What version of teststand are you using, looks like an early version of TestStand.
    Have you tried using an integer instead of a boolean.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Optical Output Recording Problems

    Im trying to use the optical output on the motherboard (MSI 875P NEO) to record music to my portable minidisc player.  The problem Im experiencing is that the Minidisc display shows "No Copy" when I set it to record, this as I understand it is a copy protection facility built into minidisc's to prevent repeated copying from digital sources.
    Is there some setting that I need to set in the Soundmax control panel to resolve this issue, Ive tried enabling PCM & AC3 independantly but if either are active then the problem occurs.  Im only trying to record MP3's.
    Has anyone else had any experience with this?
    Thanks
    Dave

    This has nothing to do with SoundMax drivers or motherboard.
    I have to lock this thread immediately or remove it because of the contents of this topic could put MSI into trouble as this forum is hosted in MSI server. Sorry about that.

  • Have a problem in Formatting output with Escape Sequence

    class Welcome
         public static void main(String args[])
              //Khong the hieu noi
              System.out.println("Welcome\tto the world of java");
              System.out.println("Happy\tBirthday");
              System.out.println("Welcome\" to the world of java");
              System.out.println("Bo\ttay");
              System.out.println("Be\ttay");
              System.out.println("Nhe\ttay");
              System.out.println("Welcome\tto Viet Nam");
              System.out.println("?Welcome\tto Viet Nam");
              System.out.println("!Welcome\tto Viet Nam");
              System.out.println("*Welcome\tto Viet Nam");
              System.out.println("#Welcome\tto Viet Nam");
              System.out.println("$Welcome\tto Viet Nam");
              System.out.println("%Welcome\tto Viet Nam");
              System.out.println("^Welcome\tto Viet Nam");
              System.out.println("&Welcome\tto Viet Nam");
              System.out.println("/Welcome\tto Viet Nam");
              System.out.println("Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println(" Welcome\tto Viet Nam");
              System.out.println("Bodsdsadsme\ttay");
              System.out.println("come\tto");
    Let's explain for me...Thanks

    Dou you have a question ?
    The character and string escape sequences allow for the representation of some nongraphic characters as well as the single quote, double quote, and backslash characters in character literals and string literals:'\b'     /* \u0008: backspace       */
    '\t'     /* \u0009: horizontal tab  */
    '\n'     /* \u000a: linefeed        */
    '\f'     /* \u000c: form feed       */
    '\r'     /* \u000d: carriage return */
    '\"'     /* \u0022: double quote    */
    '\''     /* \u0027: single quote    */
    '\\'     /* \u005c: backslash       */In case you are using Java 1.5, you might be interested in System.out.printf(), which usesformat string.

  • Split the incoming data into multiple grouped output records

    I have three fields in the source, Student ID, Student name and Student Marks. I need to map the details in the destination, by grouping the data on the basis of marks obtained. Each time there's a new mark , the corresponding details of names and student
    ID is saved under the a new mark group that is created. how do i come about it when there are n number of new marks?

    for your scenario i used below xml as input,
    <ns0:Students xmlns:ns0="http://BTSTempProj.StudentDetailsIn">
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>20</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student> 
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>10</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>20</StudentMarks>
      </Student>
      <Student>
        <StudentID>StudentID_0</StudentID>
        <StudnetName>StudnetName_0</StudnetName>
        <StudentMarks>30</StudentMarks>
      </Student>   
    </ns0:Students>
    and here is the output, hope this is what you are looking for. 
    <ns0:Students xmlns:ns0="http://BTSTempProj.StudentDetailsOut">
    <StudentMarks>10</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    <StudentMarks>20</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    <StudentMarks>30</StudentMarks>
    <Student>
    <StudentName>StudnetName_0</StudentName>
    <StudentID>StudentID_0</StudentID>
    </Student>
    </ns0:Students>
    Please find the below xslt which you can use, it is basically based on the Muenchian grouping suggested by Ashwin
    <?xml version="1.0" encoding="UTF-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0" version="1.0"
    xmlns:ns0="http://BTSTempProj.StudentDetailsOut" xmlns:s0="http://BTSTempProj.StudentDetailsIn">
      <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
      <xsl:template match="/">
        <xsl:apply-templates select="/s0:Students" />
      </xsl:template>
      <xsl:key name="groups" match="Student" use="StudentMarks"/>
      <xsl:template match="/s0:Students">
        <ns0:Students>
          <xsl:for-each select="Student[generate-id(.)=generate-id(key('groups',StudentMarks))]">
            <xsl:sort select="StudentMarks" order="ascending"/>
            <StudentMarks>
              <xsl:value-of select="StudentMarks/text()"/>
            </StudentMarks>    
            <Student>    
              <xsl:for-each select="key('groups',StudentMarks)">
                <StudentName>
                  <xsl:value-of select="StudnetName/text()"/>
                </StudentName>
                <StudentID>
                  <xsl:value-of select="StudentID/text()"/>
                </StudentID> 
                </xsl:for-each>
            </Student>
          </xsl:for-each>        
        </ns0:Students>
      </xsl:template>
    </xsl:stylesheet>
    Regards, Amit More

Maybe you are looking for

  • Right Hard Drive for My zv6000?

    Good afternoon:  I have an HP Pavilion zv6000, p/n PN494AV. It was running Windows XP Home Edition.  The hard drive appears to have died.   I'd like to get a new drive but I am not very hardware savvy.  If I give you the specs for the old hard drive

  • All music & apps not showing in iTunes

    I recently purchased the new MacBook Pro 15" and transferred all my iTunes music, apps etc from a backup from my Time Capsule. However, when I open up my iTunes, the screens meant to be showing my music and apps are blank. I can access the iTunes sto

  • Updated ipad2 with new os half through the restore it tells me to enter a backup file password.. I never set one??

    updated ipad2 with new os half through the restore it tells me to enter a backup file password.. I never set one??

  • Using Content Engine for SOCKS Proxy

    We have a CE566 integrated with an ICAP server in a proxy role for our network. we are experiencing issues with a Java applet that many of our users use with an outside vendor. Here are the test results from Sun's Java J2RE development team who we're

  • Taxes in FI Customer Invoice Document

    Hello Guru, We are currently using TAXINN procedure and tax conditions for posting taxes. There are many time when there are sales made without raising any Sales Order/Delivery Documents. Billing for all such sales are handled by finance and are post