![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
FMP 8.5 For one of my clients, we have a calculated field "Pending" that depends on values of calculated fields in other tables, etc.... in other words it's a fairly complex calculation. However, the result in "Pending" is only either 0 or 1. When I perform a find on "pending" for 1...... I get a found set that includes a lot of 1s but some 0s as well. I first noticed this when the find was performed from a script, but it happens when I do it manually too. The calculation itself is behaving correctly, but not the find performed ON the calculation. Any thoughts? Thanks, Greg |
#3
| |||
| |||
|
|
FMP 8.5 For one of my clients, we have a calculated field "Pending" that depends on values of calculated fields in other tables, etc.... in other words it's a fairly complex calculation. However, the result in "Pending" is only either 0 or 1. When I perform a find on "pending" for 1...... I get a found set that includes a lot of 1s but some 0s as well. I first noticed this when the find was performed from a script, but it happens when I do it manually too. The calculation itself is behaving correctly, but not the find performed ON the calculation. Any thoughts? Thanks, Greg |
#4
| |||
| |||
|
|
FMP 8.5 For one of my clients, we have a calculated field "Pending" that depends on values of calculated fields in other tables, etc.... in other words it's a fairly complex calculation. However, the result in "Pending" is only either 0 or 1. When I perform a find on "pending" for 1...... I get a found set that includes a lot of 1s but some 0s as well. I first noticed this when the find was performed from a script, but it happens when I do it manually too. The calculation itself is behaving correctly, but not the find performed ON the calculation. Any thoughts? Thanks, Greg |
#5
| |||
| |||
|
|
1) Is this a calculation field or a non-calc field set to Auto Enter a calculation? 2) If a calc field, is it set to return a Number result? If non-calc is it a Number field? 3) Is the 'Context' of the calculation (ie the TO it is based in) the same as the TO that the layout is based on? The same as the field your searching on? |
|
I don't understand the answer. Thus I don't know whether it's actually correct. From my understanding: * is the result stored or unstored or an automatic field value from computation? * is the result based of tables within the same file or from other files? * is the result indexed or unindexed? My first guess would be to disable the index, then turning index on again in order to force a re-indexing of a possibly corrupted index. A second attempt might be a new field of type number, where you copy/paste the calculation formula to the auto-enter and update this field by either a replace operation of by updating one of the source fields with its own contents (e.g. result = a+b: goto field a and replace its contents by the result of a). "Greg Dember" <greg (AT) artocratic (DOT) com> a ?crit dans le message de news: greg-FD4E48.06545231012007 (AT) bubb...T) drizzle.com... FMP 8.5 For one of my clients, we have a calculated field "Pending" that depends on values of calculated fields in other tables, etc.... in other words it's a fairly complex calculation. However, the result in "Pending" is only either 0 or 1. When I perform a find on "pending" for 1...... I get a found set that includes a lot of 1s but some 0s as well. I first noticed this when the find was performed from a script, but it happens when I do it manually too. The calculation itself is behaving correctly, but not the find performed ON the calculation. |
#6
| |||||
| |||||
|
I'm not sure Remi has fully understood your situation, but she (HE )is right ...partly Grip |
| I'm not sure Remi has fully understood your situation, but she's right |
|
.... The calculation itself is behaving correctly, but not the find performed ON the calculation. .... |
| Generally speaking it's because one would use that calculation directly in the find mode, which is wrong as in Find mode any calculation is empty. So the way to do a proper 'find' is first to 'Set Field' your calculation into a global, and than 'find' from that 'global'. |
#7
| |||
| |||
|
I'm not sure Remi has fully understood your situation, but she (HE )is right ...partly Grip You are right, Grip, I still have FMPv 6 habits, hard to forget... Sorry to have said - again - something pretty wrong myself in the 'new' (to me) FM8 environment. Remi-Noel ---------Original messages --------------- I'm not sure Remi has fully understood your situation, but she's right in that a ### Enter Find Mode Set Field -- Criteria Perform Find ### is a better way of constructing a scripted Find than using ### Perform Find -- Criteria. ## Grip ... The calculation itself is behaving correctly, but not the find performed ON the calculation. ... Greg Generally speaking it's because one would use that calculation directly in the find mode, which is wrong as in Find mode any calculation is empty. So the way to do a proper 'find' is first to 'Set Field' your calculation into a global, and than 'find' from that 'global'. Remi-Noel |
#8
| |||
| |||
|
|
My answers: It is a calculation field Set to return a number result Context of calculation IS same as TO of layout Result is unstored (it has to be) Result is based on fields in other tables within same file result is indexed when necessary because it is unstored This is not related to how I invoke the find in a script step.... same problem occurs when I perform the find manually. NEW INFO!!! Between the time I posted originally, and now, it is behaving correctly. I suspect this has to do with the index getting updated as part of housekeeping because of opening and closing "Define Database" or something like that. I have noticed this pattern before. Is there anything I can do programmatically, to ensure that the index is updated, so that it will behave properly for my clients withhout me having to monkey around? Thanks! Greg Grip asked: 1) Is this a calculation field or a non-calc field set to Auto Enter a calculation? 2) If a calc field, is it set to return a Number result? If non-calc is it a Number field? 3) Is the 'Context' of the calculation (ie the TO it is based in) the same as the TO that the layout is based on? The same as the field your searching on? and Martin asked: In article <slrnes1fo7.5a1.t-... (AT) ID-685 (DOT) user.individual.de>, Martin Trautmann <t... (AT) gmx (DOT) net> wrote: I don't understand the answer. Thus I don't know whether it's actually correct. From my understanding: * is the result stored or unstored or an automatic field value from computation? * is the result based of tables within the same file or from other files? * is the result indexed or unindexed? My first guess would be to disable the index, then turning index on again in order to force a re-indexing of a possibly corrupted index. A second attempt might be a new field of type number, where you copy/paste the calculation formula to the auto-enter and update this field by either a replace operation of by updating one of the source fields with its own contents (e.g. result = a+b: goto field a and replace its contents by the result of a). "Greg Dember" <g... (AT) artocratic (DOT) com> a ?crit dans le message de news: greg-FD4E48.06545231012... (AT) bubbleator (DOT) drizzle.com... FMP 8.5 For one of my clients, we have a calculated field "Pending" that depends on values of calculated fields in other tables, etc.... in other words it's a fairly complex calculation. However, the result in "Pending" is only either 0 or 1. When I perform a find on "pending" for 1...... I get a found set that includes a lot of 1s but some 0s as well. I first noticed this when the find was performed from a script, but it happens when I do it manually too. The calculation itself is behaving correctly, but not the find performed ON the calculation. |
![]() |
| Thread Tools | |
| Display Modes | |
| |