April 23, 200421 yr I have a question i have a layout in CDML and i have this tag [fmp-field: weeknr 1] in my site i see 1 (day 1) is there a posability that i can covert this to the word monday instead of 1 with CDML? tnx FileMaker Version: 6 Platform: Mac OS X Panther
April 23, 200421 yr This does not answer your question, but you should be made aware that the space in your field's name can cause problems. Eliminate spaces in field and file names: weeknr1 not weeknr 1.
April 23, 200421 yr You can use a Calculated field in the database to do that; or You can use some Javascript in the browser to do it; or You can use seven [FMP-If] tags. Good Luck. Garry
April 26, 200421 yr Author thanks for your quick posts but i cant get it working with FMP-if i have [fmp-field: Weeknummer Copy] and that shows 1 on my cdml file and i want 1 to be monday how do i get that with [FMP-if] tag? [FMP-if Weeknummer Copy .eq. 1] Monday [/FMP-if] something like this?
April 26, 200421 yr You can try these (some examples of what Garry mentioned): Make a calculated field in FM, where the calculation is this: Case( day=1, "Monday", day=2, "Tuesday", day=3, "Wednesday", day=4, "Thursday", day=5, "Friday", day=6, "Saturday", day=0, "Sunday", "Yesterday :P") [FMP-If] statements in page: [FMP-If: DayNumber.eq.1]Monday[/FMP-If] [FMP-If: DayNumber.eq.2]Tuesday[/FMP-If] [FMP-If: DayNumber.eq.3]Wednesday[/FMP-If] [FMP-If: DayNumber.eq.4]Thursday[/FMP-If] [FMP-If: DayNumber.eq.5]Friday[/FMP-If] [FMP-If: DayNumber.eq.6]Saturday[/FMP-If] [FMP-If: DayNumber.eq.0]Sunday[/FMP-If] I'm not that great with Javascript, so if neither of those work for you, maybe someone can post some javascript for you... Hopefully one of those works for you. Also, as mentioned earlier, you should take spaces out of your field names, it looks cleaner and can help avoid problems down the road that you may not forsee at the moment... Good luck!
Create an account or sign in to comment