JohnC# Posted May 31, 2001 Posted May 31, 2001 I Have two files one the clients "clients.FP5" and one for the inscrption "inscription.FP5". In Clients.FP5 I need to calculate a field that verify if a client as an inscription for the formation # "101" for exemple. So I have to look the inscription.FP5. If he is in #101 formation then the calculated field become "Yes" .Is it possible to do this wihtout using a script :? Thank you for your help !
mfrost Posted May 31, 2001 Posted May 31, 2001 Hi! Let's see if this is what you need: You have got the following fields in your "clients.fp5" database: - name_cli - yes - inscription In the "inscription.fp5" database you have got the following fields: - name_ins - inscription number First of all you need to create a relationship in the clients-db: File --> Relationships --> new enter the name (possibly clients_inscription) and choose the inscription.fp5 as related file. Define name_cli and name_ins as the key of the relation. Then you doubleclic on the inscription field in the clients db. In the first line of the new window zou choose the relation (clients_inscritption) and choose then the field inscription. Then it will show you the numbers of the other field. Then define the field Yes as a formula: If (inscription = "101", "Yes", "no") Hope it will work. Regards, Matthias
mfrost Posted May 31, 2001 Posted May 31, 2001 Hi! Let's see if this is what you need: You have got the following fields in your "clients.fp5" database: - name_cli - yes - inscription In the "inscription.fp5" database you have got the following fields: - name_ins - inscription number First of all you need to create a relationship in the clients-db: File --> Relationships --> new enter the name (possibly clients_inscription) and choose the inscription.fp5 as related file. Define name_cli and name_ins as the key of the relation. Then you doubleclic on the inscription field in the clients db. In the first line of the new window zou choose the relation (clients_inscritption) and choose then the field inscription. Then it will show you the numbers of the other field. Then define the field Yes as a formula: If (inscription = "101", "Yes", "no") Hope it will work. Regards, Matthias
JohnC# Posted May 31, 2001 Author Posted May 31, 2001 Its ok but a client can have more than one insription...
Chuck Posted June 1, 2001 Posted June 1, 2001 Define a field in the inscription file that checks to see if the inscription is of the correct format. Have it return a 0 if it is formatted correctly and a 1 if it is not. FileMaker interprets 0 as false and 1 as true, so name your field something like Inscription_Not_Formatted. There's a reason for doing it this was, as you'll see. Now, in the clients file, I'm assuming you have some relationship so that a record in clients can see the records in inscriptions. Define a field in clients that is a number calculation set to the following: Sum( inscriptions::Inscription_Not_Formatted ) This will tell you if all of the inscriptions are formatted correctly. Since Inscription_Not_Formatted is defined to be 0 if it is formated, the sum of all the inscriptions should be 0 if they are all formatted correctly. If even one is not, then the above calculation will turn out to be greater than 0, and will return a positive number. Not only does FileMaker interpret 1 as true, but it also interprets any positive number as true. You could make this a little more explitic by chaning the above calculation to read as follows: Case(
Recommended Posts
This topic is 8647 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 accountSign in
Already have an account? Sign in here.
Sign In Now