knaap Posted April 23, 2004 Posted April 23, 2004 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
Unable Posted April 23, 2004 Posted April 23, 2004 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.
Garry Claridge Posted April 23, 2004 Posted April 23, 2004 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
knaap Posted April 26, 2004 Author Posted April 26, 2004 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?
IrongateMachine Posted April 26, 2004 Posted April 26, 2004 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!
Recommended Posts
This topic is 7593 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