Find Statement Issue

I’m using the latest version of PanX, and having a problem with what should be a simple task.

I have the following find statement in the procedure box of a popup button on my form:

find Name contains findName

‘Name’ is the field name I’m trying to search, and ‘findName’ is the variable name set in the ‘Data:’ field.

The variable is set properly each time (I checked it with a ‘message’ statement before the ‘find’ statement), but every time I select a name from the popup button I get a random record selected, sometimes a few above the chosen name in the database, and sometimes a few below the chosen name.

Is there a known issue with the ‘find’ statement? I couldn’t find one looking here through the comments, but I didn’t check the issue tracker.

Thanks for any help.

Issue #556 sounds similar. Apparently, it happens when the data sheet and a view-as-list form are both open.

1 Like

Good catch. That seems to have fixed the find issue. I had a view-as-list form open that was hidden using very small setwindow settings that I’d forgotten about.

It seems this is still an issue. When I have a form open along with the data sheet, I get very erratic results with the Find command. In the Find/Select dialog window when I enter the criteria, it immediately displays the proper record. However when I click on the Find button it jumps to a different one. Using the Find in a procedure likewise yields erratic results. It is not a large file - only 25 records and a dozen fields. Using Find on a text field with all unique entries. “Select” works exactly as it should. The problem is just with the “Find” command.

You may be misunderstanding what Find does.

Find will move to the 1st record in the current selection of records where the criteria is met.

If you find it doing something different than that, perhaps you can do a screenshot of what your criteria and results are.

Robert hit on it, but didn’t quite complete the thought.

Even if the correct result might be displayed while in the dialog, it may not be among the selected records. On that basis, Find won’t find it, although Select will.

This is with all records selected. I want it to move to a specific records so I can change certain data. In the dialog it shows the correct record so I know my search criteria is correct. However when I click on the “Find” button, it does not jump to that record, it goes to a different seeming random one. The same happens when I do it programatically. This is only an issue when I have the data sheet open and my report form at the same time. If only one of them is open, it works as expected.

Given the order that they appear in the datasheet, does it always Find (or make active) the top most record that meets the criteria?

(The order that they currently appear in the datasheet is the only order that matters in this situation. It will always find the top most within those records.)

Thanks for your interest. There are no duplicates in the field. There would always only be one record that would match. I have recorded a screen capture to demonstrate the issue. I am searching the field MSCFund. You can see that in the dialog it immediately locates the desired record. However clicking on the Find button takes me to a different one. (Panorama 10.2 (4555) running on an M4 Mini with Sequoia 15.1.1)
CleanShot 2024-12-11 at 18.13.14

While the Datasheet is visible, using the ‘Field / Analyze’ submenu item, do you have a ‘Remove ALL Summaries’ option? If so, choose that.

Is your field “MSCFund” a number (integer) field or a text field?
Your Find dialog is searching for a value, but your “Procedure_A” searches for a text string.

It is a text field.

There are no summaries

Then you should use a text search criterion in your search dialog, e.g.

MSCFund contains 10

There is nothing wrong with using the = sign in text.

Using Contains is a distinctly different criteria which would incorrect return ‘210’.

Something else is amiss. I would suggest that Kevin share his db with someone who might take a personal look to see what we can not see from afar.

I refer back to the original post from 2018 at the top of this thread which referenced the same problem, if a form contained a text list object. While mine does not, the indicated resolution then was to make sure that you did not have the data sheet and the form open at the same time. Although I don’t have a text list object in my form, having only one of them open also resolves my issue. i.e. if I only have the form open or only have the data sheet open “Find” behaves as expected. However with both open I get this behaviour. It seems to me this is a bug.

The screenrecord does not show the form (clearly). While it is not clear what is happening, it is often best to have someone else be able to duplicate the issue. As it was presented, I was not able to duplicate the issue.

The issue described at the top of this thread (from 2018) only applied if the form contains either a Text List or Matrix with the Navigation option, or was a View-as-List form. This issue hasn’t been fixed, and probably won’t ever be fixed. If your using a form like that, you’ll need to close either the form or the data sheet, you can’t have both open at the same time. Essentially the data sheet and the list in the form “fight” each other to control the navigation between records.