July 13, 200619 yr hello, i have been trying to do this but still in vain. i have a field(date format) with the date of expiration. what i want is to have a script which will find data and show them on screen of those expiring 30 days from current date. any help. thank you
July 13, 200619 yr Try this script: Enter Find Mode[] Set field [exp date; Get ( CurrentDate ) + 30 ] Perform Find[]
July 13, 200619 yr Author thanks for the reply. i tried what you suggested: Set field [ ("EXPIRATION"); Get ( CurrentDate ) + 30 ] it is giving me an error "an operator is expected here" help!
July 13, 200619 yr Hi you have to enter the name of your field, without (" and "), something like: Set field [ YourTable::EXPIRATION; Get ( CurrentDate ) + 30 ]
July 13, 200619 yr Author i am sorry for the confusion. the above script works (latest post). but what i really want is all data that will expire in 30 days from present day and not only those expiring exactly 30 days from present day which the present script does. thanks again.
July 13, 200619 yr You will need to use global fields to enter the start and End dates for the Range, and then perform a find on that range. g_start (text, global storage) g_End (text, global storage) Script is: Set Field [ YourFile::g_Start; Get ( CurrentDate ) ] Set Field [ YourFile::g_End; Get ( CurrentDate ) + 30 ] Enter Find Mode [ ] Set Field [ YourFile::Expiration; YourFile::g_Start & "..." & YourFile::g_End ] Perform Find [ ] HTH Lee
July 13, 200619 yr Or simply: Enter Find Mode [ ] Set Field [ YourTable::ExpirationDate ; Get ( CurrentDate ) & ".." & Get ( CurrentDate ) + 30 ] Perform Find [ ]
Create an account or sign in to comment