Check if item is already referenced in the table

Hi everyone!

I’m trying to build an assistance app, i already have my structure but i’m having problems finding the correct expression. I attach a diagram below for better understanding.
Basically i have a list of persons, and i have to create an inscription to a program.
Each person CAN HAVE multiple inscriptions to different programs (i.e: John Doe => preschool, Lunch, Chess, Taekwondo).
Right now i can make a inscription to a program, but the app let me create duplicates (i.e John Doe => preschool, preschool, preschool, Lunch, Chess, Chess, Taekwondo).
I want to add an IF statement to Inscription’s table that prevents adding a person if that person already have a reference to that program, i feel that i have to use Count // select // Contains, but i’m getting lost in how to check if a referenced person already has a referenced program.

Thank you in advance, any help is appreciated!!!

Tomi

0 6 190
6 REPLIES 6
Top Labels in this Space