multiple field index
Jose Lerebours
fpgroups at gmail.com
Tue Dec 22 14:37:12 PST 2015
People, remember that associated records are exactly that, records
within the record and you should not need to use @af to point to the
instance of the "record" or "array"
So, if you have a1, a2, a3, a4 ... b1, b2, b3, b4 ...
selecting records based on a1 eq @td, you just need to reference the
records based on their "associated field names", meaning, use a1, a2,
a3, ... Use what we know as "real" fields if you need to use a field
outside the associated block
a1) Date
a2) Pay Amount
a3) Credit Card Number
a4) Approval Code
:if: a1 eq @td
:then: goto DOIT
:: end
DOIT:if:
:then: process payment if cc merchant
:if: ccpayment went ok
:then: a4=ccpayment approval code; write
::end
or something to that effect.
You only need to use @af you are not taking advantage of the "associated
fields" ... Then again, there is a chance I am grossly mistaken and have
used it wrong all these years. ;-)
Hope all goes well!
On 12/22/2015 05:25 PM, Mike Schwartz via Filepro-list wrote:
>> I have created a file that can have up to 12 credit card transactions
> dated
>> today or in the future...
>>
>> So each morning I want to send the current dated ones to be processed but
>> think I'm having a brain cramp on this...
>>
>> I have 12 fields that are date fields (each shows as a1) Date of 1st Pmt
>> a1) Date of 2nd Pmt, etc...then each has it's corresponding amount....
>>
>> How would I select records dated just today and grab the corresponding
>> amount for that date?
>>
>> I have the index built and can search by that day, but do I need to 'step'
>> though each of the 12 dates and if it matches today grab the amount in the
>> amount field for that day?
>>
>> I tried this and am exporting these records but it only exports the last
> record
>> it finds with today's date??
>>
>> Scott
>> PDM
> Whenever you want multiple export lines to be written to the export
> file from within one filePro record you have to use a "write" command to
> "force" the write of the exported line out to the file.
>
> You don't have to "step" (loop) through the 12 fields if you use @AF
> (associated field instance). @AF knows which date instance (1-12) caused
> the index building to select the record.
>
> Mike Schwartz
>
>
>
>
> _______________________________________________
> 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