Page 1 of 1
Adding Text search fields
Posted:
Mon Dec 21, 2009 9:54 am
by dzakary
I'm trying to add a couple of extra TEXT fields to fmSearchResults. I've followed the instructions:
Added an additional field to the Table01 layout, given it a new object name (Text07) and modified the "Search - Perform Find" script to handle the additional field - yet whenever I perform the search I get no results. The data is there, it just seems that there is a problem somewhere.
Also, I often get one less result than what should be returned. If there are 7 valid records, only 6 get returned. The return value is set to 30.
Posted:
Mon Dec 21, 2009 3:40 pm
by John Sindelar
LOL. Sorry about that. The directions are complete but our screen shot showed adding another instance of the line incrementing the $n variable: that was a mistake. You only want one instance of that line incrementing $n.
Take a look at the new screen shot in the documentation here:
http://www.seedcode.com/pmwiki/pmwiki.p ... MoreFields
Make your script look like that and I believe both of your problems will be addressed. Very sorry for the inconvenience.
Posted:
Mon Dec 21, 2009 4:38 pm
by dzakary
Thanks John,
I had figured that was the case. It was the one line of code that seemed out of place.
Still having issues with not all of the results showing up. Figuring it might be something in the Create Line Results script. Off to debug more.
One more
Posted:
Mon Dec 21, 2009 4:42 pm
by dzakary
I've also noticed that the $$sr Objects variable doesn't always seem to get updated or it gets changed back to the default. I've added an additional field in the TEXT field section, it while debugging it doesn't always seem to add the Text07 entry into the variable.
Results not showing up properly
Posted:
Mon Dec 21, 2009 4:56 pm
by dzakary
I was having trouble where not all of the results would display in the list. I'm working with a very small recordset (10 records) to test and configure with. In doing a search I should get 6 records back - fmSR was returning 4 and in some instances only 1. While stepping through the scripts I could see that all 6 records were being found, but not added to the results display.
In the Create Line Results script there is a loop about 3/4 of the way down. When I added a "Go To Record/Request/Page [First]" step just AHEAD of the loop command that seemed to fix it.
Still testing.
Posted:
Mon Dec 21, 2009 5:00 pm
by John Sindelar
Yes, if you sort your results you'll need to go to the first record after sorting.
You can find more about this here:
http://www.seedcode.com/pmwiki/pmwiki.p ... rOfResults
Posted:
Mon Dec 21, 2009 5:02 pm
by dzakary
And I was sorting.