dspires Posted July 11, 2001 Posted July 11, 2001 This is the CDML code for the totals (plus some) <P>Displaying records [FMP-rangestart] thru [FMP-rangeend] of [FMP-currentfoundcount] records found. ([FMP-rangesize] records displayed). As far as the columns, the standard for display for multiple records is in rows, it's easier to scroll down than over. But if you know that there will be a limited number of records, look here for a column solution: http://www.fmforums.com/ubb/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=22&t=000385
coffeyb Posted July 12, 2001 Posted July 12, 2001 I'm sure this question is cake for a seasoned user so pls forgive me if I sound like a jackass... NUTSHELL: I am trying to display a results page that displays multiple records from a search in a columnar format WITH the total number of records displayed. SCENARIO: I am trying to display all the equipment and drops in a particular room. For example, if I click on the Room 114 link, I would like the results page to list in columns all the records with 114 in the ROOM field and display a count of all the records found on the results page. REWARD: A thank you and a rating. I hope I articulated enough info to describe the desired solution, if not, pls ask me any specifics. TIA!!
coffeyb Posted July 12, 2001 Posted July 12, 2001 I can live with the records being displayed in rows, the only thing that I am not sure of is--Do I keep repeating the tokens to display the multiple records. For example: [FMP-record] DROP:[FMP-Field: DROP] PORT:[FMP-Field: PORT] EQUIPMENT:[FMP-Field: EQUIPMENT] DESCRIPTION:[FMP-Field: DESCRIPTION][/FMP-record]<BR> [FMP-record] DROP:[FMP-Field: DROP] PORT:[FMP-Field: PORT] EQUIPMENT:[FMP-Field: EQUIPMENT] DESCRIPTION:[FMP-Field: DESCRIPTION][/FMP-record]<BR> or is there another way to simply display all the records found in the set without having to do the above??
dspires Posted July 12, 2001 Author Posted July 12, 2001 I don't know what you're using tokens for. Nothing needs to be repeated in the CDML, FMP repeat the formatting between the [FMP-Record] tags for each record in the found set. Your code should look like: <script language="javascript"> var columns = 1 </script> <table border="2" cellspacing="5" cellpadding="5"> <tr> [FMP-record] <td>DROP:[FMP-Field: DROP] PORT:[FMP-Field: PORT] EQUIPMENT:[FMP-Field: EQUIPMENT] DESCRIPTION:[FMP-Field: DESCRIPTION]</td> <script language="javascript"> if (columns<2) { columns++ } else { document.write("</tr><tr>") columns = 1 } </script> [/FMP-record] </tr> </table> BTW, on my previous, I should also have given you the CDML to put on your page to get the next set of records: [FMP-linkprevious]Previous page of records.[/FMP-linkprevious][FMP-linknext]Next page of records.[/FMP-linknext] [ July 12, 2001: Message edited by: dspires ]
dspires Posted July 12, 2001 Author Posted July 12, 2001 You can also try this format. Set the number of rows to display (I used 3) and it will display the data in column across the page. The first 3 records in the first column, next 3 in the 2nd column, etc. If you set the -max number of record on the form that feeds this result, the formatting should work nicely: <P>Displaying records [FMP-rangestart] thru [FMP-rangeend] of [FMP-currentfoundcount] records found. ([FMP-rangesize] records displayed). <script language="javascript"> var rows = 1 </script> <table width=100% border=0 cellspacing=5 cellpadding=0> <tr> <td valign=top> <table border=1 cellspacing=0 cellpadding=2> [FMP-record] <tr> <td valign=top>DROP:[FMP-Field: DROP]</td> <td>PORT:[FMP-Field: PORT]</td> <td>EQUIPMENT:[FMP-Field: EQUIPMENT]</td> <td>DESCRIPTION:[FMP-Field: DESCRIPTION]</td> </tr> <script language="javascript"> if (rows<3) { var rows = rows+1 } else { var rows = 1 document.write("</table></td><td valign=top><table border=1 cellspacing=0 cellpadding=2>") } </script> [/FMP-record] </table> </td> </tr> </table> <P> [FMP-linkprevious]Previous page of records.[/FMP-linkprevious] <P>[FMP-linknext]Next page of records.[/FMP-linknext] [ July 12, 2001: Message edited by: dspires ]
Recommended Posts
This topic is 8604 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now