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

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

Recommended Posts

Posted (edited)

how do you get a text field to read a repeating field with text....i cant get a result of 1 or 2

Example: I have a text field-A with text in it "M-01"

Then i have Repeating field with text in it "S-01", "W-01", "M-01"

I need a calculation that says that Text field A has something in common with the Repeating field...the "M-01 is in both fields"....need a number result of 1...meaning yes

If the Text field A does not match the repeating field then i need a number of 0...meaning no

Edited by Guest
Posted

But i have 20 Repetitions

should it read

Extend(text field) = GetRepetition(textfield,1) &

Extend(text field) = GetRepetition(textfield,2) &

Extend(text field) = GetRepetition(textfield,3) ...etc

Posted

I am not sure what your intended result is. If you want all the repetitions of a repeating field, try:

GetRepetition ( RepeatingField ; 1 ) &

GetRepetition ( RepeatingField ; 2 ) &

GetRepetition ( RepeatingField ; 3 ) &

...

GetRepetition ( RepeatingField ; 20 )

(You would probably want to include some separator in-between the repetitions, too.)

This is much simpler in version 8.5, with its List() function - or, if you had the Developer version, you could a use a custom function instead of having to enumerate the repetitions.

The Extend() function is meant to be used with a NON-repeating field in a repeating calculation field. IIUC, your situation is exactly the opposite.

Posted

Please do not edit your posts AFTER they have been answered - it makes us look stupid. If you have a clarification or a follow-up question, add a new post.

I will answer your (new) question shortly, but first you need to clarify for which version of Filemaker this is intended. You indicate version 7 and Mac OS 9 (this is not possible) AND Server 5.

Posted

Try:

Let ( listOfValues =

GetRepetition ( RepeatingField ; 1 ) &

GetRepetition ( RepeatingField ; 2 ) &

GetRepetition ( RepeatingField ; 3 ) &

...

GetRepetition ( RepeatingField ; 20 )

;

not IsEmpty ( FilterValues ( FieldA ; listOfValues ) )

)

This will return 1 if the value in FieldA is included in one (or more) of the repetitions of RepeatingField, 0 otherwise.

Posted

lets see if this could be done - two test files

file xxxxxx is a list of classes (Code), and cof class(Conflicting Classes) are other classes that cannot be taken because the Class (Code) is at the same time.

a student registers for a class he/she is given a reg #, a record in made (the first record shows he registered for M-01). The second record shows he/she registered M-02). M-02 conflicts....i need to show that there is a "CONFLICT" and cannot take the class.

two_files.zip

Posted

I am sorry, your files are too cryptic for me to follow.

In general, given a core structure of:

Students -< Enrollments > - Classes

conflicts would be managed by defining a self-join of Enrollments (joining all OTHER enrollments of a specific student), and testing for a conflict there.

If each class has a list of conflicting classes, then the test for a conflict would be: my class cannot appear in a concatenated list of my siblings' classes list of conflicting classes. Or, same thing: a list of my sibling's classes cannot contain any class that's listed in my class as conflicting.

BTW, I would use a related TO instead of repeating fields for the conflicting classes.

Posted

I got a message but no e-mail address

here is what it has to do:

its very simple i have two files as suppied

file: xxxxxx Each record is a Class..... the code (Class number) "M-01" .....and cof class (Conflict classes you cannot take) M-02, W-01, sf-1, M-05

File: xxx2 If a student registers for a class Example Reg (Registration student number) "1" picked Code "M-01" creating the first record .....then he picks "M-02" the second record...this should be a conflict because on file xxxxxx cof class "m-02" has a conflict with M-01 the sudent cannot pick this class...the word "CONFLICT" should appear...this is the same for the fifth record "M-05" is a CONFLICT

dave

Posted

At the top of this page there's a menu. Click My Profile > View Private Topics. There should also be a flashing indicator at the right of the menu, which will take you to the same place.

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