Jump to content

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

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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?

Posted

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

  • 2 weeks later...

This topic is 8229 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.