LongFeiFengWu
Technical User
Here is the script I'm working with:
FName = request.querystring("FName")
LName = request.querystring("LName")
YEAR1 = Year(Now())
SQL = "SELECT * "
SQL = SQL & "FROM SCORE WHERE SUPID = '"& request.querystring("SUPID") &"' "
SQL = SQL & "AND YEAR1 = "& YEAR1 &" "
objrec.open SQL,objcon,3,3
Dim months, vars
months = Split("JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC",",")
vars = Split("AHTC,AHTE,AHTO,CPH,ATT,TIPS,OBS,REV,MEET,DEV",",")
FOR v=0 TO ubound(vars)
Execute("Dim " & vars(v))
Execute(vars(v) & "=0")
Execute("Dim " & vars(v) & "_count")
Execute(vars(v) & "_count=0")
Execute("Dim YTD" & vars(v))
Execute("YTD" & vars(v) & "=0")
next
For v=0 to ubound(vars)
For m=0 to ubound(months)
Execute(vars(v) & "=" & vars(v) & " + objrec(""" & months(m) & vars(v) & """)")
Execute("IF objrec(""" & months(m) & vars(v) & """) > 0 THEN " & vars(v) & "_count=" & vars(v) & "_count+1")
next
next
FOR v=0 TO ubound(vars)
Execute("YTD" & vars(v) & " = formatDIV(" & vars(v) & "," & vars(v) & "_count,1)")
next
do while not objrec.eof
Link = "<a href='edit.asp?SUPID="& objrec("SUPID") &"&YEAR1="& objrec("YEAR1") &"'
What I want to do is take the arry and add part of it to the Link = "<a href='edit.asp?SUPID="& objrec("SUPID") &"&YEAR1="& objrec("YEAR1") &"' as &Item= whatever, so that when the link is clicked, it carries the exact MONTH & VARIABLE combination that was clicked.
The array was written by a nice person on this forum for me, so I don't quite understand it well enough yet to do this.
Any help would be greatly appreciated.
"If nothing within you stays rigid, outward things will disclose themselves. Moving, be like water. Still, be like a mirror. Respond like an echo." ~ Bruce Lee
FName = request.querystring("FName")
LName = request.querystring("LName")
YEAR1 = Year(Now())
SQL = "SELECT * "
SQL = SQL & "FROM SCORE WHERE SUPID = '"& request.querystring("SUPID") &"' "
SQL = SQL & "AND YEAR1 = "& YEAR1 &" "
objrec.open SQL,objcon,3,3
Dim months, vars
months = Split("JAN,FEB,MAR,APR,MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC",",")
vars = Split("AHTC,AHTE,AHTO,CPH,ATT,TIPS,OBS,REV,MEET,DEV",",")
FOR v=0 TO ubound(vars)
Execute("Dim " & vars(v))
Execute(vars(v) & "=0")
Execute("Dim " & vars(v) & "_count")
Execute(vars(v) & "_count=0")
Execute("Dim YTD" & vars(v))
Execute("YTD" & vars(v) & "=0")
next
For v=0 to ubound(vars)
For m=0 to ubound(months)
Execute(vars(v) & "=" & vars(v) & " + objrec(""" & months(m) & vars(v) & """)")
Execute("IF objrec(""" & months(m) & vars(v) & """) > 0 THEN " & vars(v) & "_count=" & vars(v) & "_count+1")
next
next
FOR v=0 TO ubound(vars)
Execute("YTD" & vars(v) & " = formatDIV(" & vars(v) & "," & vars(v) & "_count,1)")
next
do while not objrec.eof
Link = "<a href='edit.asp?SUPID="& objrec("SUPID") &"&YEAR1="& objrec("YEAR1") &"'
What I want to do is take the arry and add part of it to the Link = "<a href='edit.asp?SUPID="& objrec("SUPID") &"&YEAR1="& objrec("YEAR1") &"' as &Item= whatever, so that when the link is clicked, it carries the exact MONTH & VARIABLE combination that was clicked.
The array was written by a nice person on this forum for me, so I don't quite understand it well enough yet to do this.
Any help would be greatly appreciated.
"If nothing within you stays rigid, outward things will disclose themselves. Moving, be like water. Still, be like a mirror. Respond like an echo." ~ Bruce Lee