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.
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.
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)
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.
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.