Normal Topic Dumb Search Question (Read 440 times)
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Dumb Search Question
Dec 2nd, 2005 at 9:38pm
Print Post Print Post  
Element name: Target_Completion_Date

I want to Search for all records "due" in the next 30 days - something like <=@date + 30. Naturally, this won't work since Sesame is looking for an exact match. I could enter a date range, but I want to run a command button or macro that will just go snag the next 30 days of workorders that are due. (Number of operators I just don't want to train but want them to be able to print the records out.)

I know I gotta be overlooking something obvious???

  
Back to top
 
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: Dumb Search Question
Reply #1 - Dec 2nd, 2005 at 9:55pm
Print Post Print Post  
Quote:
I want to Search for all records "due" in the next 30 days - something like <=@date + 30. Naturally, this won't work since Sesame is looking for an exact match


That will work but you need to put the <=@date + 30 in {} braces. But it will retrieve all records that have a date less than 30 days from now which includes last year.

Here is an easier way.
Put a command button on your form
Add Programming so it only appears in Search Mode
Program it with the following
Code
Select All
Var vSuccess as Int

FormFieldValue(@Layout, "Target_Completion_Date", 0, @Date + ".." + @Str(@Date + 30))

vSuccess = @SelectTreeItem("Search Menu!Search Commands!Retrieve New Results (F10)") 



Let me know if that doesn't work.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: Dumb Search Question
Reply #2 - Dec 2nd, 2005 at 10:13pm
Print Post Print Post  
Arrrggghhh - braces! I knew it was something obvious! Undecided  It was actually <= {@date + 30}, but you got me there. You're also right about getting last year's results, but there's another element that needs to be blank that won't be for last year's records, so this actually would work.

I like your idea with the command button. Will try it tomorrow.

Thanks Ray!
  
Back to top
 
IP Logged
 
NICEBERG
Full Member
Members
***
Offline


I came, I saw, I'm still
trying to figure it out!

Posts: 208
Location: Green Bay, WI
Joined: Dec 17th, 2003
Re: Dumb Search Question
Reply #3 - Dec 2nd, 2005 at 10:50pm
Print Post Print Post  
Couldn't wait - did it today. Works great! Thanks again!!
  
Back to top
 
IP Logged