Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Hi All,

Hopefully, one of you have done something similar to this.

I have an online form that is registering students for placement exams at a university. For any date and time, a maximum of 30 students can register. When a given date and time exceeds 30 registered students, that date should be removed from the value list that holds the available dates and times.

The thing is that I don't know whether that kind of capability can be facillitated over the web using CDML in combination with Java or JavaScript or if it is even possible at all.

Do any of you you happen to know how value lists are stored and can be referenced in scripts in FM? If only I could use a simple array construct and loops for keeping counters, life would be so much easier!

Thanks for any insight you might offer,

Cristy

Posted

Maybe you need a field in the DB that only keeps a valid date whilst there are still places available ?

When all the places are taken then the "Date" should be removed.

I'm not too savvy on the web side, but this is a way of getting yourself a value list that matches your requirements.

Posted

That's one elegant way to do it, yes. Create a calculation field in the database with a function something like

If (places < 31, Date, "")

This displays the date if the places field (the count of the number of people enrolled) is less than 31, otherwise the date is "hidden" by making it null.

Another way is to do a find for the dates that have places < 31 and only display these records on the page.

Either method is OK, try both and look for pros and cons.

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