Hi,
I have the solution working really well with just one problem.
When I first open my database, I cannot get the search to work. I enter a search term, then click the magnifying glass and nothing happens. Checking the script, it appears to think there is nothing in the search box.
I have to click out of the box, or minimise and then maximise my window. Then the system works fine.
Any ideas as to what I am doing wrong?
Thanks
Search Widget FM9
5 posts
• Page 1 of 1
Posts: 3
Joined: Mon Oct 05, 2009 3:35 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
It sounds like you're not committing the edit to the search field before the script does its work. But the search script itself does this so I'm not sure why this might be happening.
Does it behave this way if you copy and paste the search widget right from the fmSearchResults example file? That has a couple script triggers on it and perhaps those got mixed up if you edited the widget. Let me know if pasting in a fresh one helps, and if it doesn't, let me know which version of FileMaker you're using. Best, John John Sindelar
SeedCode |
Posts: 3
Joined: Mon Oct 05, 2009 3:35 am |
John,
A bit more info... Looking at the script in script debugger, SR_SearchString is empty right from the beginning and so the script exits as it does not think I have entered anything. I stopped the script at the "Set Error Capture [On] step in script debugger. If I then click out of the widget and then back into it, then press the widget and run the script again, the variable SR_SearchString has my info in it. I'm on FM 9.03 Nigel |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
It is OK for your field not to be committed at the Set Error Capture on step. The commit step further on (after the comment "Commit first...") takes care of this.
When you watch it in the debugger, where is the script exiting? John Sindelar
SeedCode |
Posts: 3
Joined: Mon Oct 05, 2009 3:35 am |
Hi,
Ive sussed it by adding a Commit in your search script to just after the Set Error Capture [On] as the script was checking for an entry and I was not getting to the Commit in the If statement which would just Exit Script anyway. Works fine now. Thanks |
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests