Text List questions

I only have one at the moment, but I know there will be more.

I have been creating many text lists since my earlier question about Live Clairvoyance, and they are pretty cool. After doing my first one with the constructor and all of its tags and options, I have been assembling them mostly in graphics mode.

The one I am working on now doesn’t use a search box, I have several data buttons to set a set of criteria, and it works well, mostly. This one uses ZipDistance to calculate the distance customers are from a specified ZIP code. One of my buttons sets the maximum distance I want to see results for. Is there any way to sort this list, only in the list, without having to re-sort the database itself? I would like to list my results in ZipDistance order, low to high.

OK, I do have another. Sometimes when I click on an item in the list, my database goes to that record, as advertised. Sometimes, at least as often, it does nothing. Sometimes when I have successfully moved to a selected record, then click on another item in the list, the highlight goes to my new selection, as expected, then it jumps back to the previous one (which is the current record in the database) and stays there. This can happen over and over again, and at some point it will finally act the way I wanted it to act in the first place. I have witnessed such behavior in Help, which I assume is using text lists. Has anyone else seen this?

You can set Sorting in the Text List Options:

In this same panel, note the Database Navigator checkbox. If that’s checked, clicking on a line in the List causes that record to become the active record in the database. In other words, Database Navigator synchronizes the Text List with the database.

Check out Text List Object, and its link to Text List Database Integration in the Pan X Help for more details. It may answer your other questions; the ones you haven’t asked yet. :wink:

If the Database Navigator option is turned on, you can’t sort the Text List separately from the database. They are locked together.

If the Database Navigator option is turned off, you can sort as Jim Cook noted. However, there is no way to sort by individual columns. It will sort by the data in the row, which usually means a text sort of the first column. It can’t do a numeric sort and it can’t sort by the 2nd, 3rd, 4th column etc.

That’s what I figured. I saw the sorting option, but without letting me choose which column I want to sort on, it won’t do any good. And I require database navigation, so that’s what I’ll go with.

I have never turned Database Navigation off on purpose, but as I said above, sometimes it acts as if it’s on, and sometimes as if it’s off. Today it’s working correctly.

I’m interested in the database Navigator to do as James pointed out - to make the clicked record in the list become the active record in the database when the TLO is closed. But it doesn’t work for me because I used a variable with an array selected build. Is there a way I could make that work - here’s my code. I really like the look of the TLO - very helpful.

Local thenumis
superobject “rmannumber”, “open"
ActiveSuperObject “gettext”,thenumis
FileGlobal vTextList
Select «RMAN» contains thenumis
ArraySelectedBuild vTextList, ¶, “Retention Schedule”, «Agency Item Number» +¬+ «Record Series Number» +¬+ «RetCode» +¬+ «Years» +¬+ «Months» +¬+ «Days» +¬+ «AmendmentNumber» +¬+ «AmendmentType» +¬+ «Record Series Title»
setwindow 80,38,695,1010,”"
opendialog "DepartmentListing"
ShowVariables thesaorgnum, titleholder

With database navigator selected, sometimes the text list selected record does not match the data sheet selected record. This will occur when the record selected in the text list is not visible in the currently selected records in the data sheet. If you click a record in the text list that is not visible int he data sheet, the data sheet does not change its currently selected record. This might be what you have observed.
Of course the ability to have a text list selection that is disconnected from the data sheet selection can be very useful, and one can have more than one test list visible with different selections, a potentially useful tool.

In the brief unpredictable periods of time when my Text Lists are not going crazy (see other thread) I discover some other issues with Text Lists. The way I am using some of them is to seed a GetText* operation with a value that is in the currently active line in the Text List, using an index into tabarray( of the line. I also display the results of a lookup( using the same info. It works fine, if a line is currently active (i.e., highlighted). When I have performed a Query that gives me a new Text List, no line is initially selected, I have to click something first. Is there a way I can force the first line of the new Text List to become active, by default, whenever I get a new list from a new query?

I tried to explore Help about matrix stuff, but when Pan X goes crazy, nothing in its world works.

*GetText still has the same old problem:

field or variable "textValue" does not exist

It often will give me this response the first time I try to use it, then it may or may not work correctly when I try to repeat it. I’ve tried SuperGetText, which doesn’t seem to have this problem, but I don’t particularly like the presentation of the dialog; GetText is much more useful as it is.