June 17, 200223 yr i have a field in my database that is a calculation. it calculates the records number in the current found set by using the Status(CurrentRecordNumber) function. it is set to not store the result and calculate as needed. on a results page on my website this field is displayed along with other information. it works perfectly when i only have one search parameter. however, when i have more than one search parameter it appears to still number the results as if i was only searching by the first parameter. in other words, my results should also show 1, 2, 3, 4, 5, 6 etc., but instead these are results are showing something similar to 4,23,25,32,43,57 the strange thing is, when i go and look at the database where it is being hosted, the correct values appear for each record. but through the web i get the bizarre ones. any thoughts?
June 17, 200223 yr Can't say off-hand what the problem is with the calculation, but if all you need is to number the records in your found set from 1...n, then use the [FMP-CurrentRecordNumber] tag.
June 17, 200223 yr Author unfortunately, numbering is not all i need to do. i left details out for simplicity sake. but here goes: i'm trying to get my results to wrap after each 3rd item. to do this i have a calculation field that generates one piece of html if the current record number is mod3 and a different piece if the current record number is not mod3. that is why i cannot use [FMP-CurrentRecordNumber] i'm reading on different ways to achieve this "wrapping" thing, but as i've already built it using this method and what i've done SHOULD work, i was hoping someone may have encountered this problem before and tell me how to fix it. thanks, tim.
June 17, 200223 yr quote from other topic from me: did you make sure the field isn't stored (see store options below the calculation)
June 17, 200223 yr Author yup. i did. and as i said above, the calculation shows correctly on the database, but not through the web. i have since used a javascript solution to this problem, but it still seems worth looking into. i know that you've used this particular solution before, did you not have these problems with it?
June 17, 200223 yr I used a similar thing with row colors and that one does work oke. what language version of filemaker are you using? english?
June 17, 200223 yr Try this: <table><tr> <script>i = 1 ; nCols = 3 ;[FMP-Record] if ((i % nCols) == 0) { document.write("<td>[FMP-CurrentRecordNumber] [FMP-Field:name]</td></tr><tr>") ; } else { document.write("<td>[FMP-CurrentRecordNumber] [FMP-Field:name]</td>") ; } ; i++ ;[/FMP-Record] </script></tr></table> or you could try this:<table><tr> <script>i = 1 ; nCols = 3 ;[FMP-Record] if ((i % nCols) == 0) { document.write("<td>" + i + " [FMP-Field:name]</td></tr><tr>") ; } else { document.write("<td>" + i + " [FMP-Field:name]</td>") ; } ; i++ ;[/FMP-Record] </script></tr></table> Hope this helps. Garry
Create an account or sign in to comment