timmy Posted June 4, 2001 Posted June 4, 2001 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?
Vaughan Posted June 5, 2001 Posted June 5, 2001 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.
Garry Claridge Posted June 5, 2001 Posted June 5, 2001 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
timmy Posted June 5, 2001 Author Posted June 5, 2001 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.
Garry Claridge Posted June 5, 2001 Posted June 5, 2001 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
timmy Posted June 6, 2001 Author Posted June 6, 2001 hey garry, i figured it out, i just had bad HTML code. thanks again for everything, timmy.
Recommended Posts
This topic is 8640 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