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.

conditional value list on calculation field

Featured Replies

  • Newbies

 

Hello

Sorry for the question... certainly asked numerous times.

I am spending two days trying to understand the concept but didn't catch the idea to implement it.

My database is a medical invoices one.
I have one table for patients administration (one of the fields is a calculation field with his/her age in years depending of the birthdate),
one for invoices,
another one for invoice lines,
and another one for medical examinations provided by our office (including the Minimum patient age and the Maximum patient age for each exam).

The medical exams list is provided by a pop up menu for each invoice lines.
After selecting the appropriate exams, the price of the exams are populated and the total of the invoice is calculated.

At this point, every thing is ok...
but I need to limit the available choices of medical exams in the pop up menu to the exams possible for each patient depending his/her age.

I failed to success with error "index Missing".

Please may you provide the best practice in this kind of situation?

Thank you. 

You need to start by defining a relationship between Patients and an occurrence of the Exams table (here, I will call it AvailableExams) as:

Patients::cAge ≥ AvailableExams::MinimumAge
AND
Patients::cAge ≤ AvailableExams::MaximumAge

Then define your value list to use values from AvailableExams::ExamID, show only related values starting from Patients.

This is assuming you are selecting the exam in a record of the LineItems table that is already related (through Invoices) to a patient in the Patients table (and therefore also related to the available exams in the AvailableExams TO).

Caveat: untested.

Edited by comment

  • Author
  • Newbies

Thank you very much!

It works flawlessly! :-)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.