General information
Category:
Coding, syntax & commands
test.spam1 thur test.spam4 are table fields that I am reading. They are not fields on forms bound to a table. let me show you the code.
select xfer_payroll
scan
a1 = xfer_payroll.ssn
select * from payroll_tbl into array a__gen4 ; where payroll_tbl.ssn = a1 and payroll_tbl.pp = c1
if type('a__gen4') # 'U' and type('a__gen4') # 'L'
ficatot = xfer_payroll.fica1 + xfer_payroll.fica2
spamstr = xfer_payroll.spall
e1 = ceiling(len(spamstr)/9)
first_sw = .t.
for .f1 = 1 to e1
if first_sw = .t.
first_sw = .f.
.h1 = 1
.h2 = 9
else
.h1 = h2
.h2 = h2 + 9
endif
g1 = alltrim(upper(substr(spamstr,.h1,.h2)))
do case
case g1 == 'FLSA'
I need find the right field based on value of .f1
case g1 == '30YR'
case g1 == 'KFLEX'
case g1 == 'LONPY'
case g1 == 'AUTO'
case g1 == 'BLPAY'
case g1 == 'UNIFM'
otherwise
endcase
I look at .f1 and base on which loop number I am in, I need to find value from appropriate field. If .f1 is 3 then I need to retrieve value from field xfer_payroll.spamt3. Since all of my field are name similar like xfer_payroll.spamt I need a way to attach a number to end so that if .f1 was equal to 3 then field I am going to retrieve value from is xfer_payroll.spamt3.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only