June 4, 200124 yr i have a database with a repeating field. i want to display this over the web. however, i only want to display it for the information that is actually there. not the blank repetitions. each record has a different amount of information in the field. how do i do this?
June 5, 200124 yr Timmy The best solution is to get rid of the repeating field and use a related file and portal instead. it's not a lot of work and the benefits are great. Otherwise if you want to continue with the repeating field, try using CDML [FMP-If: fieldrepetition.neq.] to only display the field if it is not empty. I've never worked with repeating fields over the web.
June 5, 200124 yr Timmy, Here is some Javascript I use for eleiminating any empty repeating fields. [FMP-Record] <a href="http://www.clarsys.com.au/tournsw/pdfs/[FMP-Field age].pdf" target="main">[FMP-Repeating:chapter]<script>if ("[FMP-RepeatingItem]" != "") {document.write("[FMP-RepeatingItem]<br>");}</script>[/FMP-Repeating]</a> [/FMP-Record] Hope this helps. Garry
June 5, 200124 yr Author Garry, Your code works well, except, when i load the page, i now get "Unterminated string" errors. It doesn't do it for every instance of the repeating field. but it def has soemthing to do with it. it could just be a mistake in my HTML. do you know anything about this? thanks again, tim.
June 5, 200124 yr I haven't come across that error before. I wonder if you use the encoding parameter to better encapsulate the data from the database? Try using RAW, and see what happens. [FMP-RepeatingItem: Encoding ] Raw - Don't perform any encoding URL - Perform URL encoding HTML - (default) Perform HTML encoding Break - Perform HTML encoding and replace soft returns with <br> I will be travelling for the next couple of days. I will be able to do some tests after that. All the best. Garry
June 6, 200124 yr Author hey garry, i figured it out, i just had bad HTML code. thanks again for everything, timmy.
Create an account or sign in to comment