Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7814 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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 smile.gif

Posted

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

Posted

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 ! wink.gif

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 crazy.gif

Posted

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.

:?

Posted

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.

Posted

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.

Posted

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.

Posted

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 smile.gif"

if u know what I mean....I get the concept that house has a wall and the roof...but me building it is frown.gif

let me look some more perhaps I can build a cabin instead smile.gif

thanx_

Posted

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)___ grin.gif

Make your home sweet.

Posted

hey hey Yugo man smile.gif 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" laugh.gif :

thanx_

Posted

laugh.gif

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.... wink.gif

Posted

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 laugh.gif

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 frown.gif

when it comes to scripts "I feel like a baby trying to get to the milk..." OK I will stop laugh.gif

Thank you guys!

Posted

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.

Posted

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!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.