Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 8640 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.

Posted

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 tongue.gif" border="0age].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

Posted

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.

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.