June 28, 200421 yr Hi...I've created a simple database and used Claris Homepage to generate the Web interface to the db. One field is used to collect the names of the users. In some of the pages of the Web interface, that info appears as a checklist in the db (so that people can click and unclick their names). In other pages, however, I want to display that same list of people as a list that's either separated with line breaks or with commas. How can I do this? Here's the code that I'm working with: [FMP-field:Editor Designer Name] With this format, all of the names are separated only by spaces. I'd like a break or a comma. I've tried adding <br> after the closing ], but that didn't work. (It works in the checkbox context, but not this one.) Thank you for any help. Barbara
June 28, 200421 yr Try this: [FMP-field:Editor], [FMP-field:Designer], [FMP-field:Name] Good Luck. Garry
June 29, 200421 yr Author I'm so sorry that I wasn't clear about this...there is only one field in question and its name is "Editor Designer Name". That field contains entries like this: George W. Bush, Osama Bin Laden, Kim Jong-il. Should I redesign the database to use a separate field for the first name and another field for the last name? (Sorry if this is a really naive question! I haven't been using FM for very long if it isn't already painfully obvious :-)
June 29, 200421 yr Hi, if the field is a standard text field then FMPro should display it on the web just like it displays in the database. If you want it to display: Editor1, Designer1, Name1 Editor2, designer2, Name2 etc then [FMP-RECORD] [FMP-FIELD: Editor Designer Name]<BR> [/FMP-RECORD] should work OK but if you want: Editor1 Designer1 Name1 Editor2 Designer2 Name2 then I guess you need to make a separate calculation field kinda like: newfield= Substitute(Editor designer Name," ","P") where "P" is that paragraph symbol (can't do it here!) ...and the cdml code would be the same, except you call the new field and use "break" to translate the line breaks: [FMP-RECORD] [FMP-FIELD:Newfield,Break]<BR> [/FMP-RECORD] Hope i understand what you want to do. If not, maybe post your cdml code here. regards, jeff PS: people generally tell me it can cause problems if you use spaces in fieldnames for the web.
June 29, 200421 yr Author Thank you so much for the information. I'll try it now. About spaces being potentially problematic for fields--I should have realized that. (Having used Unix for 25+ years, you would think I would have known better. :-)
June 29, 200421 yr Author Actually, the field is a checkbox field (it isn't a text field). I should have included THAT information in my original post too. Would the calculation that you enclosed work for a checkbox field? (I have never looked into calculations before--looks like I should!)
June 30, 200421 yr The FM Layout Checkbox inserts the "P" hence, no need for the Calc field and this CDML (modified from Jeff's) will give you line breaks between each of the entries: [FMP-Record] [FMP-Field:Editor Designer Name,Break]<BR> [/FMP-Record] This is to give you a listing. You could use a little bit of Javascript to do other things. All the best. Garry
June 30, 200421 yr Author Thanks to Garry and Jeff for helping. I couldn't quite get the calculation field to work (because I don't know enough about this), but the code that Garry sent worked. Thank you both again, so much.
Create an account or sign in to comment