Why is this debugger line TRUE?

Richard Kreiss rkreiss at verizon.net
Wed Dec 14 10:11:47 PST 2011


Top post

Stanley,

Think of the associated fields as an array. Unless you specify a specific "element", Filepro looks at all elements of the array for a match. 

To test a specific "element" use @af=.

Richard Kreiss
GCC Consulting
Sent from my iPhone

On Dec 14, 2011, at 10:50 AM, Jeff Harrison <jeffaharrison at yahoo.com> wrote:

>> From: Stanley - stanlyn-com <stanley at stanlyn.com>
>> To: 'Jeff Harrison' <jeffaharrison at yahoo.com>
>> Cc: 
>> Sent: Wednesday, December 14, 2011 2:57 AM
>> Subject: RE: Why is this debugger line TRUE?
>> 
>> T op post...
>> 
>> In this case, the if statement should be false, but it is showing true.  
>> 
>> This code is being triggered when saving the record that calls the
>> subroutine.  This subroutine is also called by a @wlfI7) routine at other
>> times.  
>> 
>> Lets dissect it...  The I2) component by itself is true, and the I7)
>> component is false...  Just look at the I7) part of the if statement that is
>> If: I7) eq "", and then look at the last line where I asked the 
>> debugger
>> "what is the value of I7)?" and it shows me its 18.70 also shown on 
>> the last
>> line, so clearly the reported value of 18.70 is not equal "" as shown 
>> in the
>> if statement, and that why it should be evaluating to false...  
>> 
>> Is the debugger trustworthy, as it sure has it wrong here, or am I missing
>> something?
>> 
>> The debugger image is at http://www.stanlyn.com/public/fpError.png
>> The field map is at http://www.stanlyn.com/public/fieldmap.png
>> 
>> 
>> Stanley
> 
> The statement is true and it is showing as true.  Again, what you are missing is that when you are executing the code as the result of saving the record, then filepro sees it differently than if it was the result of @w field-based event.  For this reason and others, In my opinion, you should not allow your input processing to "fall through" to your when processing.   
> 
>> Lets dissect it...  The I2) component by itself is true, and the I7)
>> component is false...
> 
> No, I7) is true as well.  In input processing your are looking at the group - so if any of your I7s match, then the whole line matches.
> 
>> Just look at the I7) part of the if statement that is
>> If: I7) eq "", and then look at the last line ...
> 
> Again, as I mentioned, the debugger is only showing you the value of the first field in your associated group - it is not equipped to show you all the values.
> 
> Jeff Harrison
> jeffaharrison at yahoo.com
> Author of JHExport and JHImport
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list


More information about the Filepro-list mailing list