Unexpected list action

In the text list shown, when clicking on a list item, the details should be editable in the text editor objects on the right. Database Navigator is checked, however, if I click on any list entry whose date is greater than today, the text editors don’t change to match the list entry and they can’t be edited. Should the date affect the interaction? At the time, I took this shot, it was earlier than 1/26/18 and you can see that the fields on the right are not updated.

I don’t know why a date would affect this behavior, but I know that if I click on a record in a text list but that record is not part of the current selection then the text fields (on the right part of your form) will not update to the record selected in the text list. Is it possible that the record selected in the text list is not in the current selection of records in the data sheet?

Tom’s reply would be my thought as well. When using a Text List like this you probably want to make sure that all records are selected.

Ok, I have been banging my head on this one for a long time now and I can’t find a solution. You are both right, the record that was not updating was not selected, however, that’s exactly what I need to happen. For example, I need to pick a subset! of a file, let’s say date is less than today, and display only those records that meet the criteria. As you can see from the attached, there are blanks lines between records and at the end which represent records in the file that are not selected. This no no good. It shouldn’t display all the records in the database when only three are selected. A user will want to know why they are there. I also can’t get a list or a Matrix to redraw with just the records selected. There should be an option like “records selected” or something as the formula for the matrix. At one point, I actually got a list to display only what was selected, but the minute I edited a field, it put in the blank records again. In my opinion, neither of these objects are a replacement for the simple “view as list” form but unfortunately, it can no longer be edited.

Also, note that the record count at the bottom of the page shows 5 of 8 records selected. There are only 3 selected. This is not the list/matrix search. I made a separate one for that to the right of the “Search” field. This is just a display of info(“selected”). From my experience, at least on this form, it is never accurate.

Any ideas?

If the data that is being displayed in the text list has carriage returns (or line feeds I think), that will cause the data to be moved to the next line of the list. I suspect that is causing your blank lines. If you look at the data in the row above the blank line, and you may find a carriage return, or more than one.
I just created a form like yours in my Dutch/English database.

The data displayed matches the records selected in the DataSheet. (You remember, right, that the data displayed in the text list need not match the data sheet selection.). To get the text list to display only what is selected, edit the query field for the Text List and add an info(“visible”) search parameter. Here’s what mine looks like:

info(“visible”) and ((exportline() contains «_liveSearch») or («_liveSearch» = “”))

For the drop down menu, the procedure will select the records where the Part of Speech matches the selected value.
Getting the list to update when you edit the field is an issue. It does not happen automatically. Gary Yonaites posed a workaround in the forum. I see you have an update button so maybe you know that already. If not, look for Gary’s post.
Finally, I note that building your text list this way is good for small databases, but I have found it slows down and other approaches are much faster when the size of the data grows.

Here is the workaround code I posted in the past that forces the list to update:

if info("eof")

The up/down or down/up will not show on the screen at all and only the list will show the update.

Thanks for your input.

I am opening a To Do file where the .Initaialize procedure is selecting a subset of the database, then opening the list view. If somebody edits a record that affects the selection criteria, for example marking an item done, changing a date, etc., that record became a blank line in the list. The Update button on my form is a temporary way for me to update the list while I’m trying to figure this out. There’s no way I would expect a user in a real world environment to press an update button each time they make a change to a record. That would not be acceptable. Even if they made a bunch of changes before hitting “update” the list would look like swiss cheese and be very confusing.

My update button (procedure) merely switches to graphics mode, then back to data mode (with no show, endnoshow) which usually refreshes the list. I added a line of code on every text editor object to reselect the subset of the database based on changes made and refresh the list but it still shows blank records for the unselected records.

That being said, we are making some progress here. Putting "info(“visible”) and ((exportline() contains «_liveSearch») or («_liveSearch» = “”))” in the list query field worked! It now shows only the records selected in the database, however, editing is still an issue. I have two popupbuttons that I am able to make update the form. I set them with Data being the field and comma separated values. I put the following code in the procedure pane:

Select Date≤today() and Type≠"Appt" and done≠"Y"

I think up record, down record is cleaner than switchtographicsmode, switchtodatamode, however there might be a problem if only one record is selected. The list will not update without the Select line but it does refresh with it.

I still can’t get a text editor object to update the list. I put the same code in the procedure section but it is ignored. I also tried the “switch” code but that still fails. If I manually switch from graphics to data modes, the list is updated. Doesn’t make much sense to me. I would appreciate any further ideas on that issue.

Finally, I note that building your text list this way is good for small databases, but I have found it slows down and other approaches are much faster when the size of the data grows.

What other approaches are you suggesting?

Use a .ModifyRecord procedure to run the update code whenever any field is modified.


Thanks man.

The alternative I have in mind is instead of populating the text list with a formula with field names, just put a variable there that has an array. You would rebuild the array each time you want to update the text list. This is a lot more work and you have to then trigger the right arraybuild( function when needed. In text list options, put in a variable name, which equals the currently selected row; leave database blank and database navigator off, query is empty. To get the record selected in the list to show up on the right, put a formula in the text list that finds the record associated with that data (I do it by finding the Counter you see in my first column). Here’s my statement:

find Counter=val(array(fgrowvalue,1,tab()))

You can revise the functions on the lower left to show the number of rows in the array and the number of records in the database. If you have several parameters that you can set and want to search on, your formulas could get rather complicated.
Here is what my test text list looks like:

My formula for that array is:

fgtextlist=arraybuild(cr(),"",{Counter+tab()+«Part of Speech»+tab()+Dutch+tab()+English},{(«Part of Speech»=fgpos or fgpos=“Part of Speech”) and Dutch contains _liveSearch})

Don’t forget to include a show variables fgtextlist statement after each arraybuild. The only drawback I have found is there is no live Search; the list doesn’t update until you finish entering the search term and finish editing.

The only drawback I have found is there is no live Search

Thanks. It’s interesting but there’s always a catch. At the moment I’m just ignoring the fact that lists are really slow with large files but pretty soon it’s going to be a problem. When I finish testing just to find something that works, it will need to work with real world files. In my experience, using live search with 26,000 records and a fair amount of fields is not going to cut it.

I tried a text list on one of my largest databases, with >23000 records, and a file size >15 MB. A live search took 4.3 seconds. That seems quite acceptable to me.
But if I create an array and then search the array and rebuild it, it refreshes immediately, less than a second.

The customer’s file I’m working with now has 110,478 records (customers) and the file is 42 mb. It’s very, very slow.

The problem is that in Pano 6, a 41 MB, 41,000 record file does a real ‘live’ search and the resulting select takes 76 ticks. Unfortunately going forward, Pano 6 is not an option.

Robert Ameeti

Robert, do you use text lists is the 41k record file? If so, what strategies have you used to get the best speed?

The speed results I listed, were from Panorama 6.

Robert Ameeti

My text list intermittently behaves erratically. I’ve discovered the need for all records to be available in the database, but randomly the database navigation just stops working. Usually when I try to select a record, it defaults to the first record in the database, but on the occasion in this screenshot, I’m trying to select the animal “831” and its jumping between “864” (as shown) and “764”. This has happened multiple times in previous months. If I quit the programme and start again, it keeps performing the same way. I’ve tried unchecking, and then checking, the database navigation option, with no effect. However, if I give up and wait a few days, the next time I start, it will be back to business as normal (hopefully).
Any thoughts or suggestions?

I’ve just reread my post, and recognised the similarity in numbers of 864 and 764. Considering these are completely random, as far as I can tell, the similarity in number struck me. Therefore I’ve attached a screenshot of the 764 occurrence, in case this offers any clues. (So, I’ve clicked on the record “831” immediately on from the previous screen shot, and this is what has happened)

New problem.

I have a database with financial information that I have grouped by date, done some totals, and then collapsed to outline level 1. I have a text list showing 4 columns, set to info(“visible”) and database navigation checked on. I want to be able to chose the line of data to be viewed, and then go to a new form showing a lot more information about the data. However, the database navigation doesn’t work in this situation. Am I asking it to do something you wouldn’t expect it to be able to do??

I have similar tables elsewhere, with one column, and select from the list to define a variable by which I then search. If I can’t do plan A (above), plan B would be to use this setup. However, how do I direct Panorama which column to make a variable? I had thought it would create an array from the selection, but if I message the variable (to see what it is), it just shows a blank…

Plan C will be to use the search functions…

Any help appreciated.

I’m sorry, the database navigation feature will not work with summary records. This feature relies on the unique id embedded in each record, and summary records don’t have a unique id (the id of a summary record is always zero).

When the navigation option is enabled, the variable specified in the form object properties is ignored.

Have you looked into the summary table feature? I think this might be better for the custom solution you are looking for.

For your detail view, you could use the aggregate( function to calculate the totals on the fly.

A hint – if you use these functions you will not need to group, total and collapse your database. Simply opening the form would display the analysis. This would not be a “push one button to create the solution” option, but I think would allow you to create exactly what you are looking for.