Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Date Range on Calculation Date

Featured Replies

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

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.

  • Author

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

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

  • Author

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.

:?

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.

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.

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.

  • Author

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_

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.

  • Author

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_

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

  • Author

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!

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.

  • Author

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!

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.