>>>Hilmar.
>>
>>These two lines are probably the ones of interest for you...
>> m.ctagname = UPPER(TAG(lnTag))
>> m.ctagexp = UPPER(SYS(14, lnTag))
>
>Wayne,
>
>It seems to me there has been a confusion between the INDEX EXPRESSION and the FILTER EXPRESSION (for the index). I was asking for the FILTER EXPRESSION, which can be obtained through the function FOR() (I learned this in other replies to my question). I think you should add this to your sample code: it seems to me that you save index name and expression, but not the filter expression. I didn't test this, but I don't see any code to save the filter expression. Example: if I index with a command like: INDEX ON CLIENTCODE TAG CLCODE CANDIDATE FOR NOT DELETED(), I think the index name (CLCODE) and the expression (CLIENTCODE) would be maintained, but the filter (NOT DELETED()) would not.
>
>Hilmar.
Hi Hilmar,
Here is an example from one of my applications:
lnTagCount=TagCount()
if m.lnTagCount>0
dimension laIndTags[m.lnTagCount], ;
laIndExpr[m.lnTagCount], ;
laFilterExpr [m.lnTagCount]
llChangeIndex=.f. && Reset to false
lnCount=0
do while m.lnCount<m.lnTagCount and oValid.lContinue
lnCount=m.lnCount+1
laIndTags[m.lnCount]=upper(tag(m.lnCount)) && TagName
laIndExpr[m.lnCount]=upper(sys(14,m.lnCount)) && Index Expression
laFilterExpr[m.lnCount]=upper(for(m.lnCount)) && Filter Expression
FWIW, in VFP7 there is a new function ATAGINFO (?), which places information about tags into array.
If it's not broken, fix it until it is.
My Blog