Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

  • Newbies
Posted

A Custom Dialog allows user input for "Initial Date" & "Final Date". These 2 dates are stored. I would like to create a script that uses a date range in order to find all invoices within that specified range by the user through the Custom Dialog variable # 1 & variable # 2. Nevertheless the Perfom Find [] within the script doesn't allow "Date" to use the stored value in those two variables (it is expecting a "valid" date and not the name of another date variable name). Any suggestions? How can you use the range specified by the user in the Custom Dialog in order to perform the find ? Thanks!

Posted

You can set the field in find mode instead of explicitly in the Perform Find script step.

If for example you are capturing your user selection into global fields then...

Enter Find Mode []

Set Field [ YourDate; gDateStart & ".." & gDateEnd ]

Perform Find []

  • 3 weeks later...
Posted

Wouldnt that be just adjusting the start and end dates?

Posted

Sorry I dont know what you are asking. If you want to find records that have a date that start 5 days from now, your start date would be, 07/21/2009.

Posted

Try:

Enter Find Mode []

Set Field [ YourDate ; Get(CurrentDate) & ".." & Get(CurrentDate) + 5 ]

Perform Find []

what does the [ & ".." & ] part of the code do? Forgive me I want to know how to come up with this not just the answer...

Posted (edited)

Its an indicator for a range.

http://fmhelp.filemaker.com/fmphelp_10/en/html/find_sort.5.6.html

Edited by Guest
added link
Posted

[color:blue]YourDate is the target field.

[color:blue]Get(CurrentDate) & ".." & Get(CurrentDate) + 5 is the calculated result.

See:

http://fmhelp.filemaker.com/fmphelp_10/en/html/scripts_ref1.36.39.html

Posted (edited)

Ohhhhhhhhhhhhhhh Still looks the same as what I was trying to enter in but you set the target... k i get it now...

But that calc doesnt pull the records older than 5 days. It only shows todays records.

When I just do a perform find based on that calc it shows no records when I have 3 over 5 days old in records.

Edited by Guest
Posted

that calc doesnt pull the records older than 5 days. It only shows todays records.

No it doesn't - you asked "how to set it for 5 days greater than today..." and it finds records that fall between today and 5 days into the future (inclusive).

Posted

I think that you have enough to go on to try and figure out the range starting from 5 days ago to the current date... ;)

Posted

Well -5 takes last five days. so I set this to omit these records and that will show me remaining right? Is this the proper way to do it though meaning the calc? Or does it even matter how you do it as long as you get the answer your looking for.

Posted

Well there are always many ways to do things.

For example, if you just want all records that are earlier than 5 days ago then you can use

Enter Find Mode []

Set Field [ YourDate ; "<" & Get(CurrentDate) -5 ]

Perform Find []

But then you talk about omitting them. Well you could stick in a show omitted only step or you can just find for the opposite.

Enter Find Mode []

Set Field [ YourDate ; ">=" & Get(CurrentDate) -5 ]

Perform Find []

Which will find all records greater or equal to 5 days ago...

I dont know what you are looking for...

  • 4 months later...
  • Newbies
Posted

Hi,

Hope you can help. I am customising the Task Manager template that comes as part of FMPro 10. I want to be able to find tasks with an open status with a due date between and including "Date A" and "Date B". I have read your above notes but I still don't understand how to do this. Do I need to setup new global fields or can I work with what the template already gives me.

Thanks in advance for any help you can offer

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