June 25, 200916 yr Newbies 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!
June 25, 200916 yr 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 []
July 16, 200916 yr Would I use the same thing if I was setting a Perform Find Script to find records over 5 days old?
July 16, 200916 yr 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.
July 16, 200916 yr Try: Enter Find Mode [] Set Field [ YourDate ; Get(CurrentDate) & ".." & Get(CurrentDate) + 5 ] Perform Find []
July 16, 200916 yr 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...
July 16, 200916 yr Its an indicator for a range. http://fmhelp.filemaker.com/fmphelp_10/en/html/find_sort.5.6.html Edited July 16, 200916 yr by Guest added link
July 16, 200916 yr YourDate ; Get(CurrentDate) & ".." & Get(CurrentDate) + 5 The difference in Yourdate and Current date. Im not understanding this...
July 16, 200916 yr [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
July 16, 200916 yr when I input that as the calc in the set field it says its missing an operator where the semi colon starts?
July 16, 200916 yr You're not supposed to enter ALL of "that" as the calc - only the calculated result part. I suggest again you study the help page I linked to.
July 16, 200916 yr 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 July 16, 200916 yr by Guest
July 16, 200916 yr 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).
July 16, 200916 yr I really need to pay more attention to how I ask things... I need to go back into the past of 5 days...
July 17, 200916 yr 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... ;)
July 17, 200916 yr 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.
July 17, 200916 yr 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...
December 1, 200916 yr Newbies 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
Create an account or sign in to comment