And what criteria are you using in this find?
Is it a scripted find or done manually?
Manually, the user clicks on the magnifying glass and I have a script that takes them to the special find layout on enter find mode. The user types in the search criteria in the portal field and then clicks perform find in the navigation bar. on exit find mode it returns the user to the original layout.
At what point do you get the search result of none? If you modify the script not to return to the original layout, do you see the correct found set after the find on the search layout?
You may find scripted finds modeled after the examples in this thread a better option: Scripted Find Examples
No I modified it to stay on the original layout and still returns zero. I will also review your link and see if I can make use of anything there.
Well I was speculating that the change in layouts was an issue as that can mess things up in at least two different ways....
Can you give an example of the search criteria being entered that is failing to find records? If you enter really basic criteria like an asterisk in a field that is never empty, do you still get no records found? Is it only for criteria specified for a related record in the portal where you are getting this result?
If you enter really basic criteria like an asterisk in a field that is never empty, do you still get no records found?
Yes, I've tried an asterisks in all the fields in the portal and they all return nothing even if there are boat loads of records it could return.
Is it only for criteria specified for a related record in the portal where you are getting this result?
Yes, anything outside of the portal in question (the only portal in this layout) performs as it should.
Can you give an example of the search criteria being entered that is failing to find records?
"110" fails in a number field and "*" fails in all the fields.
"return nothing" as in "no records found" in the layout or no records showing in the portal? Might the portal be filtered and the filter is hiding the portal records that match the search criteria?
If that's not the issue, I have to wonder if the file or at least an index or two might be damaged. Recover a copy of the file and test the recovered copy to see if it shows the same issue. (Recovered files have rebuilt indexes and some other features are reset to "factory spec" so they may behave differently from the original even if the recover process does not report finding any damage.)
If the recovered file works OK, you might try using advanced recover options to rebuild the indexes in your file as a better option than replacing the damaged file with a back up copy.
Things to keep in mind about Recover:
While Recover almost always detects and fully corrects any problems with your file...
- The recovered copy may behave differently even if recover reports "no problems found".
- Recover does not detect all problems
- Recover doesn't always fix all problems correctly
- Best Practice is to never put a recovered copy back into regular use or development. Instead, replace the damaged file with an undamaged back up copy if this is at all possible. You may have to save a clone of the back up copy and import all data from your recovered copy to get a working copy with the most up to date information possible.
And here's a knowledgebase article that you may find useful: What to do when your file is corrupt (KB5421).
If you have FileMaker 11 or newer, you can use Advanced Recovery options to rebuild your file's indexes:
- With the file closed, select Recover from the File Menu.
- Select "Use advanced Options"
- Select only: "Copy File Blocks as-is" and "Rebuild Field Indexes Now".
- The recovered copy of the file will be identical to the original copy except that it has completely rebuilt indexes.
Hi Phil, I tried the recovery and it still did not find any records ... so obviously it's something with my relationships and what fields I have in my layout but I can't seem to figure it out!
I even tried copy pasting the portal from the user layout to the find layout and it did not find any results. Both layouts use the same exact occurrence for it's relationships and if I browse the records in the find layout everything seems normal and displays properly in the portal. The issue also isn't in the changing of layouts because when I use the script debugger I get the error message that no records have been found before the change over to the user layout.
Last, as far as I can tell ... other layouts that are setup in the same fashion work as expected and return the appropriate found records in the portal.
Could this be a field containing text in your portal that is defined as a field of type number in Manage | Database | Fields?
No it's a field containing a number but is defined as a text field. There are four fields in this portal, three are defined as number fields one as text. I've tested things I know for sure are in the one text field and only " * " in the numbered fields and of course " * " in the text field as well.