artist59 Posted February 3, 2008 Share Posted February 3, 2008 I need to perform a find based on a date range. I have the user select a FROM date and a TO date from drop down menus. I then have a script that sets the Sale Date field with the range. When performing the Find, I get the message that "No records match this set of find requests" If I manually enter the range in the Sale Date field, it finds the records no problem. Even if I copy and paste what the script set in the field and manually do the find it still finds the matching records. I don't know why it's not working with the script. Here is the script: Enter Find Mode[] Pause/Resume Script[indefinitely] Set Field [sales Orders::Sale Date; Sales Orders::Sales From & "..." & Sales Orders::Sales To] Perform Find[] Can someone let me know why I get the no records match dialog with the script but not when I do it manually? Thanks Quote Link to comment Share on other sites More sharing options...
doughemi Posted February 3, 2008 Share Posted February 3, 2008 Try: Set Field [sales Orders::Sale Date; GetAsText(Sales Orders::Sales From) & "..." & GetAsText(Sales Orders::Sales To)] --Doug Quote Link to comment Share on other sites More sharing options...
artist59 Posted February 3, 2008 Author Share Posted February 3, 2008 Doug, That also gave me the same message but I found out what's causing the problem. The layout is a list view and the From and To fields are on the Header part (I didn't want it to appear for every record). If the From and To fields have the dates in them then it can't find matching records but if I delete the dates in the From and To fields then resume the script it finds the matching records. I'll have to work out the design of this so the Date Range is entered differently (not with fields in the Header part). Thanks. Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted February 3, 2008 Share Posted February 3, 2008 Use global fields for your TO and FROM data-entry fields that your end users use to specify their requests. Values that are input into global fields do not need to be cleared before a Find, as they are ignored as Find parameters when the Find is performed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.