August 20, 200421 yr Hi LIst, After upgrading to FMP 7 one of my more complex scripts is no longer working. I'm looking to see if anyone can help me rewrite it. What I need to happen is when the script is run it need to find all orders due in the next 5 days. Simple enough, but if the cript is run on friday (or thursday for that matter) I want FMP to ignore saturday and sunday. So if activated on friday it would find fridays, monday, tues, wed and thurs orders. Below is the calculation that USED to make this happen in FMP 6. THis is the FMP 7 version though. GetAsText(Get(CurrentDate)-design information::Days Past Today) & "..." & GetAsText(Get(CurrentDate)+design information::Date Due+7) Any help is appreciated. Thanks, Steve
August 20, 200421 yr Note that in version 7, the GetAsText is probably unnecessary, as well as Insert Calculated Result, if you are using it. If you are setting this in Find Mode, I would guess that there is no data for the fields, unless you are using globals to hold 'DaysPastToday' and 'DateDue'. Try setting a global text field in Browse mode with Set Field [globaltext; (Get(CurrentDate) - DesignInformation::DaysPastToday) & "..." & (Get(CurrentDate) + DesignInformation::DateDue + 7)]. Then enter Find Mode and set your date field with the globaltext. Put the date field on the layout and add a Pause/Resume Script to see what was entered, before performing the find.
Create an account or sign in to comment