Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CDML and value lists

Featured Replies

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

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.

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.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.