USE <i>JRandomTable</i> >LOCAL nCtr, nTagCount >nTagCount = TAGCOUNT() >FOR nCtr = 1 TO nTagCount > IF UPPER(SYS(14,nCtr)) == 'REPNUM' > EXIT > ENDIF >ENDFOR >* If nCtr <= nTagCount, there's a tag, and it's number is nCtr >* You can now get the name of the Tag with TAG(nCtr) >* This won't work unless the index expression matches the field with >* no functions or extended expressions; if this were a character >* field and a tag with that field was used as a part of a concatenated >* key, or you used the UPPER() function, it won't match>