Leb i Sol Posted July 3, 2003 Posted July 3, 2003 Hi People! I know this post has be discussed already but I am not "good" (=bad) at scripting and missing some conecepts...so if you can help/advise/explain it would be greatly apprechiated. The scenario: Find all records in a date range eg. 1/1/2002...2/2/2003 my field Date is a calcualtion field defined as: Date Unstored, = RELATIONSHIP::Date --- so I spent some time on the forum and found this post by a Bob W. ========================= Enter Find Mode[] Insert Calculated Result [Date,DateToText(g_StartDate) & "..." & Date To Text(g_FinishDate)] Perform Find[] Go To Layout [Whatever layout you choose to display the found records] ===================== and it is all great (makes sense) but for some reason I can not type anything in the field(s) when I Enter the Find mode??? ----my layout------------------------ Please Enter the date range: [g_StartDate] --- [g_FinishDate] ----------------------------------- so....the simple form of my question is: Why can I not be in Find Mode and type? thanx 2 ALL
Ugo DI LUCA Posted July 3, 2003 Posted July 3, 2003 Hi Z, U even won't need any find mode if you download Bob's DateRange3.fp5 file, if you can reach the related file where the date is indexed.
Leb i Sol Posted July 3, 2003 Author Posted July 3, 2003 hi Ugo! does the date Have to be indexed and why? where can I find Bob's doc? (couldn't find it in sample files) Thanx
Ugo DI LUCA Posted July 3, 2003 Posted July 3, 2003 Hi Zila, The sample was curiously not posted in the Sample Area. Bob, could you post it there ? Here is the link though : DateRange3.fp5 Performing a search on unstored calculations could result very long while you want your user (or yourself) to get an instant result. Time is money ! When it is possible, it is therefore best design to use indexed calculations, or to find a way (scripted or lookup) to index these fields you'd be referencing in a scripted search. Wether this is possible in your case depend obviously of your case
Leb i Sol Posted July 3, 2003 Author Posted July 3, 2003 Hi Ugo! I looked at this file..but I don't get it (suprise)...I knew I can always just have a user type "date...date" to find the range but I am trying to use two fields of entry: From: [_____] To:[______] on a single Date field. :?
Ugo DI LUCA Posted July 3, 2003 Posted July 3, 2003 Hi Zila, Bob is that nice guy that offers a sampler and let you work on it as you wish, to adapt it as you wish. Just checks the define fields. There is a calc that replaces the "...", and then "paste" it in a start and end g_dates (if I can recall). Work on this. Now, it doesn't answer your need for an index for this to work.
Ugo DI LUCA Posted July 3, 2003 Posted July 3, 2003 Hi, I just redownloaded it. Sorry Bob to comment on your files. Use D1 and D2 as your start and end date. Just change the calc to a simple date field.
BobWeaver Posted July 3, 2003 Posted July 3, 2003 Leb, there are a couple of reasons why you can't enter data into a field when in Find mode. The first is when the fields are globals. The second is when you have the field formatted to not allow entry. If the fields are globals, then you will have to have the user enter the two dates while in browse mode, and then switch to find mode to transfer the data to the field where you want to perform the find. Ugo, I never reposted that sample file to the samples area because I later came up with the simpler range multi-key sample that works for both numbers and dates. The only benefit to using the daterange file is when you want the dates in the list to actually appear formatted as dates. Anyway, I'll post a link to it in the samples area.
Leb i Sol Posted July 3, 2003 Author Posted July 3, 2003 Hi Ugo! ....hmmm.....hmmm... >> If u give me "Legos" I could build a house or something that looks like one...but if u give me a concreate I don't think I could build one that has plumming included " if u know what I mean....I get the concept that house has a wall and the roof...but me building it is let me look some more perhaps I can build a cabin instead thanx_
Ugo DI LUCA Posted July 3, 2003 Posted July 3, 2003 Bob, 1. Sorry, you were online, I should have waited a little 2. I must have had a too quick look to your multikey as I didn't catched the "twin range" solution. 3. Thanks anyway for the link, and for this tip I'm using on a daily basis with a lot of satisfaction Zila, ____________The good_________thing-----with your posts__________is that we can instantly________recognize you)___ Make your home sweet.
Leb i Sol Posted July 3, 2003 Author Posted July 3, 2003 hey hey Yugo man where did this come from and what does it supposed to mean: ____________The good_________thing-----with your posts__________is that we can instantly________recognize you)___ what can I say...I like to break things down and KNOW why I am doing what I am being advised....also I am a TRUE "Scrip_Heater" : thanx_
Ugo DI LUCA Posted July 3, 2003 Posted July 3, 2003 When I browse the search layout on this Forum, I even don't need to see the poster name_______________Ciao________ But that's fun, and it works, cause I'm still curious to see what is the question behind these lines....
Leb i Sol Posted July 3, 2003 Author Posted July 3, 2003 UGO Ugo Ugo....that's OK u can make fun of me....I will see u 'try' to get on the WEB Mr.Script (hehe just kidding man Bob: then you will have to have the user enter the two dates while in browse mode, and then switch to find mode to transfer the data to the field where you want to perform the find. - the problem with being 1st in the Browse Mode is that the record gets entered into those g_Start and q_End fields and when I ran the script above nothing get found when it comes to scripts "I feel like a baby trying to get to the milk..." OK I will stop Thank you guys!
BobWeaver Posted July 4, 2003 Posted July 4, 2003 Try putting a pause step in your script right after the step that inserts the data into the date field, but before you do the Perform find, so that you can see that the correct find criteria is getting into the field. Also make sure that you un-check the restore find requests option in both the enter find mode step and the perform find step.
Leb i Sol Posted July 7, 2003 Author Posted July 7, 2003 Hi there! thanx for the respond, I was away for a bit....but the key answer was in "you un-check the restore find requests option in both the enter find mode step and the perform find step." thanx BOB!
Recommended Posts
This topic is 7814 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now