?
Solved

Filemaker Constrain Found Set

Posted on 2009-12-29
16
Medium Priority
?
1,431 Views
Last Modified: 2012-08-13
Hi and season's greetings to all,

I am having a devil of a time getting Filemaker to perform a double find/search.

I have a table named "Dividends" that stores dividend information for shares (in this case d_type = 1) and other investment types such as Term Deposits (d_type = 2) etc.
There is a parameter files with global fields, ie hold only one record.

A layout allows the user to enter dates (into parameter table) for a find on dividends , using the search: Dividends-d-type = 1

The user can choose to print to: screen, printer, file.

Once the submit button is entered the attached script comes into play.

The Date range script just checks that correct dates have been entered.

The date search doesn't work....

any ideas please???

Best wishes

Jim


Script.gif
0
Comment
Question by:jim_pilot
  • 9
  • 7
16 Comments
 
LVL 28

Expert Comment

by:lesouef
ID: 26144892
first the find could be in one step. but just a remark.
is the global field used to enter Datel and DateH a date or text field?
when you say it does not work, does it issue an error or no records or all shares?
if you do the same search manually, does it work?
and is you have the advanced version, what is the searched expression in debug mode before executing the find?
0
 

Author Comment

by:jim_pilot
ID: 26152212
Hiya,
thanks for an answer this time of the year.
Datel and Dateh are date fields, both in the Parameter table and on the layout.  The basic search on D-Type=1 works fine,  there is no date find, I get all of them.
yes, I have the advanced version, I'll send the requested info when I recover from watching fireworks down here in Sydney tonight.
Best wishes for 2010
cheers Jim :)
0
 
LVL 28

Expert Comment

by:lesouef
ID: 26152850
in this case, you should consider using dates as text in your find condition.
that is:
getastext(datal) & "..." & getastext(datah)
till next year, have a good "overnight".
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:jim_pilot
ID: 26157224
Happy and healthy 2010

OK, yes I run the advanced version.

OK, the plain date search using your getastext works for a date search only.
When I add the p_puchase_type =1 search and use 'Constrain Found Set" for the second search, the date search no longer works.

I have attached screen shots of the various scripts plus the basic layout in case that helps.

You mentioned using a single step find for what I am trying to achieve,  As I am a newbie to Filemaker I would appreciate any advice on a  better way to achieve my aim.

Many thanks in advance,
ciao  Jim


dateSearchOnly.gif
DualSearch.gif
layout.gif
0
 
LVL 28

Expert Comment

by:lesouef
ID: 26158819
What does that intermediate script "date_range" do in between? Are you sure, it's not making you leave the find mode or something?.. disable it for a test and I think it will work.
If you run this dual search in step by step mode, you'll see what happens.
Also, why don't you check date range first, then do a single query with both conditions, shares and date range? just to make it simpler though, the existing way should work.
0
 

Author Comment

by:jim_pilot
ID: 26159510
Good suggestions, thank you.

End result is with your guidance, ta, I have a solution that works and I'll attach the script in case it helps someone else.

I did disable the date range script , that didn't do anything.  So then I re-arranged the two search/finds so the date search came first followed by the "p_purchase_type=1".....and ecco (voila if you prefer French) it works fine.

I do really appreciate your assistance and would also appreciate how you would have tackled the problem of two searches.  You mentioned initially it could be done in one step.  I'd very interested to learn how please.

many thanks once more,  Jim :)
works.gif
0
 
LVL 28

Expert Comment

by:lesouef
ID: 26161036
that's a bad solution, it should work the other way round too, this is hidding the real pb unless it's a fm bug?
I'd be interested to get a copy of your file to pinpoint on this.
as for the single searh, simply use (using generic terms)
find mode
set field (type, shares code)
set field (date , data range)
execute find
0
 

Author Comment

by:jim_pilot
ID: 26163396
OK, I'll send you the file in a day or so.

I would appreciate you looking at it for me, ta

Best wishes

Jim
0
 

Author Comment

by:jim_pilot
ID: 26163666
Gidday,

I have trimmed down my solution somewhat so you can see my report problem(s).

When you open the test.fp7 it should open at a layout named: 'bankcontrol-reports"

The report in question (which will now apply to all my reports as I haven't had a chance top actually print any of them yet) is the very first one "Share Purchases".  When you go to print.view there are two layouts.  The only difference is the view to screen layout that has a "Close Window" button.

You will receive many file not found errors due to me deleting many to reduce the file size.

I do truly appreciate you looking at this for me.

Best wishes
Jim
Test.fp7.zip
0
 

Author Comment

by:jim_pilot
ID: 26163747
Hmmmm, having now done a video lesson on building reports.....I think my problem is my upgrading to OSX 10.6.1 with a HP7410 printer which doesn't print correctly.  It only prints one page of anything.  I'll go chase up new printer drivers.
Oh dear, I hope I haven't wasted your valuable time.....
stay tuned
Jim
0
 
LVL 28

Expert Comment

by:lesouef
ID: 26165991
You may have a printing pb also, but your script is no good, you exit find mode after the first "perform find".
So you either need to bundle both find conditions together or enter find mode again before setting the 2nd searched info. Since you now have 4 versions, I don't know which one is the correct one, so I'll change the first one to show you where the mistake is (named ... CORRECTED) , though putting both conditions together is better. (also shown in a copy (... BETTER do...).
http://www.pagetruck.com/Retrieve3.php?FileDesc=serge.xxxxxxx@orange.fr+8686+9691955394911599dea338446725df5a¬if_download=yes
replace "xxxxxxxx" by lesouef in the url to get it right
0
 

Author Comment

by:jim_pilot
ID: 26168688
Thank you lesouef (Merci).....
for both a correction to my script and a better way to do it.  I like it !!
I have read several books on FM none show multiple finds the way you have laid out, makes far more sense.
Thank you for taking the time to show me.
I am even happier now with this solution.
Best wishes
Jim :)
0
 
LVL 28

Accepted Solution

by:
lesouef earned 2000 total points
ID: 26169232
interesting debate... I never read any FM book myself, but a friend of mine is saying I should write one, taking into acccount the amount of examples I did for EE. I wonder which book you have, I can't believe people like Ray Cologon (a real FM guru) are writing books with no good directions.
0
 

Author Closing Comment

by:jim_pilot
ID: 31671094
Yes, I like the way lesouef tackled my problem when I had a solution but I did it the wrong way.  He gave a clear and precise script example, which was exactly what I needed.
many thanks
Jim
0
 

Author Comment

by:jim_pilot
ID: 26177791
To lesouef,
the books I bought: Filemaker Pro 10 In Depth, Filemaker 9 Developer Reference (only because I was unable to find a verison 10) , and the Filemaker Training Series by Filemaker.
The "In depth book" was best and the reference book invaluable.  If you are serious about writing a book email me for some ideas.  I think you'd be good at it.
Thanks again
au revoir
Jim :)
0
 
LVL 28

Expert Comment

by:lesouef
ID: 26178571
ok. I don't know if I could be serious about this, I never saw myself as an author, even for a tech book.
and you don't mention the one which is the most famous for me: the missing manuals:  http://missingmanuals.com/screencasts.csp
as a matter of fact, I have a big amount of example files I did for EE, and many of them are about tricks or clever usage, not basic stuff. so there may be a need for a second kind of manual, I would say a 'next step' book. for example, I remember doing an example to duplicate a record and its related records in 5 lines or so.
If you wanna discuss the topic outside here, here is my email s [at] lesouef [dot] net
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Loops Section Overview
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question