![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In article <326151f6.0308092239.1f82b2af (AT) posting (DOT) google.com>, fsromero (AT) hotmail (DOT) com (Cylurian) wrote: I read in many of these discussions not to use the repeating field option. But I'm thinking of a repeating field as an Array. Tecnically they are a one-dimensional array, but they cause headaches and problems (partly due to bugs in FileMaker itself), and FileMaker Inc. basically keeps them in to retain compatibility with older files - it's best not to use them. If you want an array, perhaps use a suite of fields, eg. 1-dimensional array = MyArray1, MyArray2, MyArray3, etc. 2-dimensional array = MyArray11, MyArray12, MyArray13, etc. MyArray21, MyArray22, MyArray23, etc. etc. I have a field that is a text time repeating field (TTRF) that is empty. The reason for the TTRF is to have a field with a range of time and with this I can search to see if a time is in that field. So, I have two fields with pulldown menus, start time (ST) and end time (ET) The data on the ST and ET are 8:00 AM, 8:30 AM, 9:00 AM, 9:30 AM....8:30 PM. The time interval are 30 minutes. I would like a script to copy the ST to the TTRF then fill the TTRF until ET. But, I can't seem to get started. I don't know how to get to the next empty field in the TTRF. I try something like: setfield["TTRF", "ST)"] setfield["TTRF", "ET)"] This doesn't work, for the results are still on the first cell of the TTRF. How do I get to the next empty cell in the TTRF? And when I figure that out, how does the script know when to stop till the ET time. I really don't want to use a text field to represent hours as 1700, for I have all my scripts using time fields. Any suggestions, any thing to get started, even how to get to the next empty field in the TTRF! If you really want to use repeating fields, then take a look at the bottom of the window where you choose the field for the Set Field command (and others). There, next to the Define Fields button, you'll see an option to specify which repitition to use. If you type in a 2 then the second repitition will be used and the script step will read as: Set Field ["TTRF"-2, "ST)"] Set Field ["TTRF"-3, "ET)"] where the -x lets you know which repitition is being used. Unfortunately there's no easy way (as of FileMaker 5.5) to Set Field a particular repitition X, where X is the value from another field - this is one of the many problems in using them. ie. you can't just Set Field ["TTRF"-X, "ST)"] There's also a bad bug in FileMaker which means that you can't use a command like: Set Field ["RepeatFieldA"-3, Get Repitition("RepeatFieldB", "4")] Instead you have to use a temporary field as a go between, ie. Set Field ["TempField", Get Repitition("RepeatFieldB", "4")] Set Field ["RepeatFieldA"-3, "TempField"] \Helpful Harry "Just trying to help whenever I can." ) |
![]() |
| Thread Tools | |
| Display Modes | |
| |