January 29, 200818 yr I'm trying to use a script found in another post: Enter Find Mode[] Set Field[MyTable::MyDateField; (Get(CurrentDate) - 30)&"..."Get(Current Date)"] Perform Find[] However, I keep getting an error message that an operator is expected after the semicolon. Am I missing something?
January 29, 200818 yr (Get(CurrentDate) - 30)&"..."Get(Current Date) (Get(CurrentDate) - 30)&"..." [color:red]& Get(Current Date) --sd
January 29, 200818 yr Author Thanks, however my problem is here: Enter Find Mode[] Set Field[MyTable::MyDateField[color:red]; (Get(CurrentDate) - 30)&"..."Get(Current Date)"] Perform Find[]
January 29, 200818 yr Author ${Territory}:language updated[color:red]; (Get(CurrentDate) - 30)&"..." & Get(Current Date) I actually had the "&" in the script, simply left it out of my comment. However, my problem is after the [color:red]";". Error message indicates I need an operator there.
January 29, 200818 yr need to use GetAsText: ${Territory}:language updated; GetAsText((Get(CurrentDate) - 30)&"..." & Get(Current Date)) Edited January 29, 200818 yr by Guest missed ( )
January 29, 200818 yr Author Thanks, but my problem is after the semicolon. Script message indicates it's looking for an operator between [color:red]";" and whatever follows.
January 29, 200818 yr You don't tell the Set Field script step what field to set in the calculation. The calculation is the result only. The field is defined via a separate dialog (Specify target field) which is a drop down list of all fields. You haven't really named your tables and fields with $ and () characters have you?
January 29, 200818 yr yes, it needs you to explicitly tell it the result to set into the field is TEXT although you are using the date range. the field that you are trying to set is a date field hence to insert a date range you need to use "GetAsText"
January 29, 200818 yr Only if the field isn't on the layout, a Go To Field can make it happen "amputated" the field where to put it. But if the semicolon is part of the calc', is it pretty obvious why the bleeping happens. GetAsText( is not necessary doe to the ampersands already in there. Breezer you are right it used to be so before fm7! --sd
January 29, 200818 yr the field that you are trying to set is a date field hence to insert a date range you need to use "GetAsText" I'm pretty sure that's not accurate.
January 29, 200818 yr Thanks Soren and D J for pointing that out, all along I have been assuming it's required. Edited January 29, 200818 yr by Guest
January 29, 200818 yr Author Okay, now I'm getting it. However, the script is not responding the way I expected it to. I want it to find all records with a date (in specified field) 'older than' 30 days from current date.
January 29, 200818 yr Today, Get(CurrentDate) - 30) & "..."& Get(Current Date) is 12/30/2007...1/29/2007 You'll have to change your calculation.
January 29, 200818 yr The easiest way is to make it an omitted request, provided you have nothing after today, it's done by adding an Omit Record/Request step just before the Perform find. --sd
January 29, 200818 yr I want it to find all records with a date (in specified field) 'older than' 30 days from current date. Why not say so right at the start. Try: Enter Find Mode [ ] Set Field [ YourTable::Datefield ; "<" & Get ( CurrentDate ) - 30 ] Perform Find [ ]
January 29, 200818 yr Author Okay, it's working. For future reference, I was using the "Calculating result" option for everything, but once DJ noted I had to use the "Specified Target Field" also it all came together. Thanks!!
Create an account or sign in to comment