Hi all
I purely have no idea where i go wrong. I'm trying to get the datas (such as CHEVSINSMZ 100,CHEVSINSMZ 100, CHEVSINSMZ 101, CHEVSINSMZ 102, etc) from the table (.dbf) display and then trim into "CHEVSINSMZ 100 & 101 & 102 itself.
_-_-_-__-_-_-__-_-_-__-_-_-__-_-_-__-_-_-__-_-_-__-_-_-_
tnfjob is the name of the table. Jt_hblno is an attribute of the table (.dbf)in the form. It is like something that originally contains CHEVSINSMZ 100,CHEVSINSMZ 100, CHEVSINSMZ 101, CHEVSINSMZ 102, etc in the column...
When I tested out the form by calling any job no (in yellow box of JOB NO), all the datas will be displayed. But I have a problem with this part (image displayed below)
I purely have no idea where i go wrong. I'm trying to get the datas (such as CHEVSINSMZ 100,CHEVSINSMZ 100, CHEVSINSMZ 101, CHEVSINSMZ 102, etc) from the table (.dbf) display and then trim into "CHEVSINSMZ 100 & 101 & 102 itself.
![[upsidedown] [upsidedown] [upsidedown]](/data/assets/smilies/upsidedown.gif)
_-_-_-__-_-_-__-_-_-__-_-_-__-_-_-__-_-_-__-_-_-__-_-_-_
tnfjob is the name of the table. Jt_hblno is an attribute of the table (.dbf)in the form. It is like something that originally contains CHEVSINSMZ 100,CHEVSINSMZ 100, CHEVSINSMZ 101, CHEVSINSMZ 102, etc in the column...
Code:
LOCAL InputString, CommaPos, i, SpacePos, PrefixString, BlNo
select j
? select ()
STORE 0 TO CommaPos, i, Counter, SpacePos
LOCAL ARRAY xAr[1]
xAr[1] = ""
PrefixString = ""
BlNo = ""
InputString= "Jt_hblno" ** <-- Problem with this part
CommaPos = AT(",",InputString)
SpacePos = AT(" ", InputString)
PrefixString = SUBSTR(InputString, 1, SpacePos - 1)
DO WHILE CommaPos > 0
Counter = Counter + 1
BlNo = STRTRAN(SUBSTR(InputString,1, CommaPos-1), PrefixString, "")
IF ASCAN(xAr, BlNo) = 0
i = i + 1
DIMENSION xAr[i]
xAr[i] = BlNo
ENDIF
InputString = ALLTRIM(SUBSTR(InputString,CommaPos+1))
CommaPos = AT(",",InputString)
ENDDO
BlNo = STRTRAN(InputString, PrefixString, "")
IF ASCAN(xAr, BlNo) = 0
DIMENSION xAr[i+1]
xAr[i+1] = ALLTRIM(BlNo)
Counter = Counter + 1
ENDIF
OutPutString = "("+ALLTRIM(str(Counter))+") " + PrefixString + " "
FOR j = 1 TO ALEN(xAr)
IF j = 1
OutPutSTring = OutPutSTring + xAr[j]
ELSE
OutPutSTring = OutPutSTring + " & " + xAr[j]
ENDIF
NEXT j
.xdf_bl.value= OutPutSTring ** Display the information on the form
When I tested out the form by calling any job no (in yellow box of JOB NO), all the datas will be displayed. But I have a problem with this part (image displayed below)