Jump to content

How to perform date range find -script in FM7 ??


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

Recommended Posts

Hi !

I have upgraded to FM7 and now I am in trouble... blush.gif

In older versions I made a date range find simply with

Enter find mode

Set field(date;Start_date...End_date)

Perform find

In this new version I just cannot figure out how to do it... blush.gif

What should I put to Find requests box. If I click "Symbol" and "..." FM only looks for "..." with no Start_date or end_date.

I am sorry for this stupid question... blush.gif

Arttu

Link to comment
Share on other sites

Actually, in previous versions you would need to use Insert Calculated Result and enclose your global date fields within DateToText in order to get the correct result. So I'm assuming you're referring to manual finds and not scripted ones, even though you referenced Set Field.

In 7, it works like you posted for scripts.

Enter Find Mode [ ]

Set Field [datefield; gStartDate & "..." & gEndDate]

Perform Find [ ]

Manual finds should be the same as previous versions.

If you are referring to the stored requests for Enter Find Mode or Perform Find, however, they can only be static (where the request will always be the same). Dynamic requests, any involving script parameters or globals, must still be entered in the way described above.

Link to comment
Share on other sites

Hi !

And thanks ! Actually I must admit, that it was my stupid mistake... blush.gif The Start-Date and End-date were defined as date-format not as gDates. Now it works. laugh.gif

But I still don,t understand the script step "Enter find modes" specify parameters. If I click there "Nationality" and add in next field "English" or Swedish" or "Dutch" and then click "Add", nothing happens when I perform the script.

Do I understand correctly that in this function I can replace these script steps:

Enter Find Mode

Set field(Nationality;"English")

New request

Set field(Nationality;"Swedish")

New request

Set field(Nationality;"Dutch")

Perform find

?? Or how to use that function ??

Thanks again in advance ! laugh.gif

Arttu

Link to comment
Share on other sites

Thanks Queue !

That cleared out some problems with find-issue. Still I don't get it how to insert field values into that Restore Find Requests blush.gif

For example: I make a script where there is a Dialogue message about find requests. The input fields are: gSearch1, gSearch2, gSearch3.

How can I do a search: Find(gSearch1 or gSearch2 or gSearch3) in that manner you showed in your example B) When I try to do that, FMP tries to search words "gSearch1, gSearch2, gSearch3"

I'm losing my nerves already... crazy.gif

Thanks in advance !

Arttu

Link to comment
Share on other sites

Only static find criteria can be stored. Dynamic criteria must still be set using Set Field, etc.

Enter Find Mode [ ]

Set Field [searchfield; gSearch1]

New Record/Request

Set Field [searchfield; gSearch2]

New Record/Request

Set Field [searchfield; gSearch3]

Perform Find [ ]

Link to comment
Share on other sites

This topic is 7022 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.