macaroni Posted May 7, 2003 Posted May 7, 2003 I've been reading a lot in this forum regarding repeating fields and I'm trying to understand what exactly they are and in what context/example they are commonly used in. I realize that this is quite an open question and could extend into several lengthy postings. I just need some basic idea as sometimes I feel lost when I read some of the post here on this board regarding repeating fields. thanks.
LiveOak Posted May 7, 2003 Posted May 7, 2003 Bottom line, Repeating Fields are a hold over from the FM 2.1 and before days of non-relational FileMaker. They really have no significant place in modern FM database design. Before all you experts chime in, there are some minor uses, but repeating fields are definitely more dangerous than useful to new users. -bd
Fitch Posted May 9, 2003 Posted May 9, 2003 There's a good thread about this subject here. In fact, you can search around and find many such threads. Blueworld is another good resource. In general, don't use repeating fields for any actual "data" that you might want to search, sort, summarize, or report on. They can be safely used for "structural" things such as containers for graphics, e.g. to use as "status flags," or to temporarily stash values in a script.
jtwilber Posted May 10, 2003 Posted May 10, 2003 Now I'm confused. I just finished creating an order form with line items in middle. The only way I (novice) could get multiple lines was with repeating fields. Regular relationships would not show multiple lines unless I made the fields repeating. What have I done wrong??? JW
AudioFreak Posted May 10, 2003 Posted May 10, 2003 Read on using a portal. A portal based on a relationship will give you basically the same look as a repeating field but with much more funcionality. Repeating fields will just cause you major headaches later in your design. My advice is get rid of them. HTH Michael
Newbies Adrian R. Foltyn Posted July 1, 2003 Newbies Posted July 1, 2003 I usually never use repeating fields but this time it seemed like the perfect solution. I usually start every FMP file with a database that I wrote a while back and has all the basic stuff already in it like sorting, searching and so on. One of the things that I customize after making a copy of this template is to give it a unique number. This way the database can identify itself to other files that I might implement later on and will do different tasks depending what file runs a script. A customer needs some kind of multi user feature on a single machine without logging in or out of user accounts (we're talking about Mac OS X 10.2, no fast user switching yet). It seemed like a perfect idea to have the privileges stored in a repeating field and every time a database needs to know if the user has the right privilege to access one of its features it would get the repetition of a repeating field by it's unique database number. Turns out this works great as more databases come in I just change the unique database number and add a repetition to the repeating field holding the privileges. So this would be my little addition to the question "What are repeating fields for?" But there was one big problem that I just found out how to solve. I like my databases to have the feature that users can undo all their editing to a record by simply pressing one button. It's odd that the revert record step only reverts the current field so I had to have a global field corresponding to every field that a user can put data in himself. So when the user goes to edit a record he actually writes the data into global fields and then if he chooses to save his modifications the data is swapped into the fields for the actual record. Well. In the case of the privileges I had to swap data around from one repeating field to the other. Would be most logical if you have a script step like this to swap the data: Set Field ["FIELD_User_privileges"-<repetitionnumber>,"GetRepetition(FIELD_Temp_privileges,<repetitionnumber>)] If you do this 8 times for 8 different repetitions you get your first repetition set, all other repetitions are cleared out. This next example however works: Set Field ["FIELD_User_privileges"-n,FIELD_Temp_privileges] How in heaven's name does FMP know that I want to set the n-th repetition of FIELD_User_privileges to the n-th repetition of FIELD_Temp_privileges? Seems to me like the last script step I showed you should set the value of the first repetition of FIELD_Temp_privileges to any repetition of FIELD_User_privileges I target with n. P.S. Is there a way to compose FMP script by typing rather than clicking? Flash has this basic mode where you get a FMP like experience when doing your scripts but also an advanced mode where you can actually copy and paste your code. I find myself doing a lot of repetitive mindless actions a lot simply because I can't generate the code in a text editor or because FMP doesn't allow to use variables for such script steps as Go to Field.
ernst Posted July 2, 2003 Posted July 2, 2003 Hi Adrian, Normally Filemaker will always 'set' the first repetition, unless you specify another repetition. Therefore I don't inderstand your >>How in heaven's name does FMP know that I want to set the n-th repetition of FIELD_User_privileges<< Can you explain this further? As to composing scripts by typing as opposed to clicking: maybe some smart Wizz has written some external program to do this, but it's not possible from within Filemaker. regards, Ernst.
Recommended Posts
This topic is 7801 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