Hi Mark:
>For the view indexes to be created when you open the view, you have to open the view using the SDT OpenTable method. See the SDT help file on OpenTable for the syntax needed to do this.
I appreciate your response, but I want to do this on the fly - plus I don't really use SDT's OpenTable(). I had a little more time to research this today, and here's what I came up with. This is basically the relevant code within OpenTable that does the deed. Doesn't appear that there needs to be a record in CoreMeta either.
lcTagName = "cFIRSTNAME"
oMeta.SetDatabase(DBC())
lnDataSession = SET('DATASESSION')
llSuccess = oMeta.oSDTMgr.CreateViewIndex("CLOSINGBOARD!V_WORKLOG", lcTagName, lnDataSession)
SET ORDER TO (lcTagName)
This is one area where Doug's docs are a little unclear. There's an AddViewIndex and a CreateViewIndex. I guess the former is what created the Coremeta record, as I used the above code on yet another field and it produced the index and reordered without creating the MetaData record.
Thanks, again, for your input.
Del
Del