General information
Category:
Coding, syntax & commands
try THIS:
* sample Call
IF !istagthere("employee","SSN")
INDEX ON ssn TAG ssn
ENDIF
*------------------------*
FUNCTION istagthere
* am checking for 254 tags, not sure if limit is higher now...
PARAMETERS lcfilename,lctagname
IF PARAMETERS() <> 2
MESSAGEBOX("You must pass both Table and Index Name")
RETURN .F.
ENDIF
lncurrarea = SELECT(1)
lbtagexist = .F.
SELECT &lcfilename
FOR ncount = 1 TO 254
IF EMPTY(TAG(ncount))
EXIT && Exit the loop when no more tags are found
ENDIF
IF TAG(ncount) = UPPER(lctagname) && Checks for tags in the index
lbtagexist = .T.
EXIT
ENDIF
ENDFOR
RETURN lbtagexist
Previous
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