![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
FMP 10 Adv: When using GTRR in a script, you want to be sure in what context/layout you land. Which test works best for you? - use the count function to check whethe related records exist - use a get function after the GTRR to check what the underlying table is - get last error after GTRR - others? I used the first method so far, but it's no use if I have to go to the related recods of all the records in my found set. I tried the third option - get last error - but I get error 101 (missing record) even though lots of records were found and GTRR worked as expected. I assume I get error 101 when there's at least one record in the found set with no related records (which is irrelevant). |
#3
| |||
| |||
|
|
FMP 10 Adv: When using GTRR in a script, you want to be sure in what context/layout you land. Which test works best for you? - use the count function to check whethe related records exist - use a get function after the GTRR to check what the underlying table is - get last error after GTRR - others? I used the first method so far, but it's no use if I have to go to the related recods of all the records in my found set. |
#4
| |||
| |||
|
|
FMP 10 Adv: When using GTRR in a script, you want to be sure in what context/layout you land. Which test works best for you? - use the count function to check whethe related records exist - use a get function after the GTRR to check what the underlying table is - get last error after GTRR - others? I used the first method so far, but it's no use if I have to go to the related recods of all the records in my found set. I tried the third option - get last error - but I get error 101 (missing record) even though lots of records were found and GTRR worked as expected. I assume I get error 101 when there's at least one record in the found set with no related records (which is irrelevant). Meaning I have check for context and found records after the GTRR. I don't like it because it means I have to hard code the name of the TO in the test. |
#5
| |||
| |||
|
|
On Jul 3, 1:44*am, c... (AT) tele2 (DOT) ch (Christoph Kaufmann) wrote: FMP 10 Adv: When using GTRR in a script, you want to be sure in what context/layout you land. Which test works best for you? - use the count function to check whethe related records exist - use a get function after the GTRR to check what the underlying table is - get last error after GTRR - others? I used the first method so far, but it's no use if I have to go to the related recods of all the records in my found set. I tried the third option - get last error - but I get error 101 (missing record) even though lots of records were found and GTRR worked as expected. I assume I get error 101 when there's at least one record in the found set with no related records (which is irrelevant). It's unclear what you're trying to accomplish, but two things come to mind: 1) Error 401 is a better test than 101. You get 101 when matching the found set and the record that's currently active has no related record. 401 pops up when there's no related records at all. 2) Are you using this db locally or over a network? I find GTRR matching the found set to be extremely slow over a network. I've tested it and found it faster to loops through the found set, setting a global field to the related keys and GTRR on a new relationship based on that global field, matching the current record only. DJ |
#6
| |||
| |||
|
|
It's unclear what you're trying to accomplish, but two things come to mind: |
|
1) Error 401 is a better test than 101. You get 101 when matching the found set and the record that's currently active has no related record. 401 pops up when there's no related records at all. |
|
2) Are you using this db locally or over a network? I find GTRR matching the found set to be extremely slow over a network. I've tested it and found it faster to loops through the found set, setting a global field to the related keys and GTRR on a new relationship based on that global field, matching the current record only. |
#7
| |||
| |||
|
|
Count actually has to calculate the count of related records. If there are a lot of them, it's slow. The Not isempty() simply calculates if there is one related record and is much faster. |
![]() |
| Thread Tools | |
| Display Modes | |
| |