copy a part of a list to another list

Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default copy a part of a list to another list

    i store my search result in a list and want to divide that list into 3 or 4 smaller lists
    How can i do this
    please help..

    Yasmin_lady Guest

  2. Similar Questions and Discussions

    1. Multi-line TextBox - Paste text with numbered list, bullet list, tab character
      Hi All, I need a server control that's exactly like a multi-line TextBox, but also allow users to paste text with numbered list, bullet list, and...
    2. Need a button to rollover, show list and link from list
      Hi, very new to Flash and need some help with a button. I'm creating a title bar for a site and I'm doing something similar to the button on...
    3. #25625 [NEW]: [chm] bug on ref.ftp.html | ftp_*list cant retrive ftp list on some ftpd
      From: sentomas at hotmail dot com Operating system: freebad PHP version: 4.3.3 PHP Bug Type: FTP related Bug description: ...
    4. copy list until...
      On 17 Sep 2003 jimbo@jimbo.com wrote: @oldpresidents = grep { "true" .. $_ eq "Bush" } @presidents; See 'perlop' for the .. operator...
    5. previous favorites list copy comment
      Regarding the comment earlier about copying one's favorites list, thank you for that info I've always wanted. Does someone know how to proceed...
  3. #2

    Default copy a part of a list to another list

    i store my search result in a list and want to divide that list into 3 or 4 smaller lists
    How can i do this
    please help..

    Yasmin_lady Guest

  4. #3

    Default copy a part of a list to another list

    i store my search result in a list and want to divide that list into 3 or 4 smaller lists
    How can i do this
    please help..

    Yasmin_lady Guest

  5. #4

    Default Re: copy a part of a list to another list

    divide based on what criteria? Have you looked at the list functions in the
    docs?

    "Yasmin_lady" <webforumsuser@macromedia.com> wrote in message
    news:d042ue$nd2$1@forums.macromedia.com...
    >i store my search result in a list and want to divide that list into 3 or 4
    >smaller lists
    > How can i do this
    > please help..
    >

    gumshoe Guest

  6. #5

    Default Re: copy a part of a list to another list

    This isn't very elegant, but should get the job done.



    <CFSET size1 = ListLen(longList) \ 3>
    <CFSET size2 = size1 * 2>
    <CFSET list1 = "">
    <CFSET list2 = "">
    <CFSET list3 = "">
    <CFSET count = 1>

    <CFLOOP INDEX="i" LIST="#longList#'>
    <CFIF count LE size1>
    <CFSET list1 = ListAppend(list1, i)>
    <CFELSEIF count LE size2>
    <CFSET list2 = ListAppend(list2, i)>
    <CFELSE>
    <CFSET list3 = ListAppend(list3, i)
    </CFIF>
    </CFLOOP>

    jdeline Guest

  7. #6

    Default Re: copy a part of a list to another list


    I think you will need to provide additional detail about how you want them divided up. Do you want them relatively equal, split after a certain point, what?


    blewis Guest

  8. #7

    Default Re: copy a part of a list to another list

    i have 6 search queries i insert the result of these queriesinto a list that list should be puted out , i want to put 10 element per page out how can i that..

    thanks alot
    Yasmin_lady Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139