July 9, 200223 yr Hi, Here we go again...just a little background first and then I'll get to the problem... I am creating an online database so that students can register for placement exams. They must select a date and time from a list of radio buttons. If a date and time is full, I need to tell that student to select another date and time. I orininally tried to run a script to give me this functionality, but since there is no way to catch any errors generated with it in CDML, I decided to try using the FMP-If statements. I have calculation fields within the database that keep track of how many are registered for a given date and time. My "new-reply.htm" format file contains the following FMP-if statement: [FMP-IF: Field:Date1Total.gte.4] <b>Sorry, the Exam Date and Time you selected is full. Click onto the back button to select a different date, and then re-submit your request.</b> [FMP-ELSE] <p>Your placement exam registration was successfully added. If you provided an email address, you will receive an email confirmation shortly. Note: You will not receive an exam confirmation via regular postal mail.</p> [/FMP-IF] BUT: Nothing displays when the page is brought up! Can someone please tell me what I am doing wrong? Here are the links to the database if you need to see what I mean: https://filemaker.ccsu.edu/data/TLC/default.htm You will be prompted to enter a username and password; leave the username field blank and enter "ccsu" in the password field. Click onto "New Record" to access the database. Thanks for any help! Cristy
July 9, 200223 yr Would a Calculated field, which counts the registrations, be of value. You could use this field to display if that course is full or not. All the best. Garry
July 9, 200223 yr Couple of things... is the Date1Total field a number field? It should be... secondly, the CDML code should be: [FMP-If: Date1Total.gte.4] ... your post had "Field:Date1Total", unless the name of the field is "Field:date1Total" of course.
July 10, 200223 yr You probably are better off using the fmp-if conditional. However you have written. >I orininally tried to run a script to give me this functionality, but since there is no >way to catch any errors generated with it in CDML ... So you will perhaps develop a better understanding, there are ways to catch when ScriptMaker does not run a script and post the proper information to your client whose script did not run. It is largely a matter of design.
July 11, 200223 yr Author Thanks for the tips. Here is the problem though: The field is numeric, and within FM it is definitely keeping count of all of the registrations. I have testing it vigorously. However, when I use CDML, for example: The current value of the counter is: [FMP: Field: Date1Counter] Nothing appears after "is:" It is as if the CDML is not able to read the field value from the database. Also, within another test, when I do the conditionals, for example, [FMP-If: Date1Counter.gte.4] Show message [FMP-Else] Show another message [/FMP-If] Nothing happens. The other message associated with the else statement doesn't appear either. If my field is numeric within the database, then why won't it show up on the web page using CDML?
July 11, 200223 yr hi there why are you using: The current value of the counter is:[FMP: Field: Date1Counter] and not: [fmp-field:Date1Counter] or: [FMP-IF: Field:Date1Total.gte.4] and not: [fmp-if:Date1Total.gte.4] i also would not use spaces in your [fmp]-tags maybe this helps. let me know best mimmo
July 22, 200223 yr I would also check the HTML source itself, some editors like to change the [ and ] brackets to their HTML counterparts.
July 22, 200223 yr "...some editors like to change the [ and ] brackets to their HTML counterparts." The reason to write your own html/cdml from scratch.
Create an account or sign in to comment