July 2, 201114 yr Let me say that this forum has been more than helpful. Thank you so much. OK, current issue I am working on... I have a "Daily Report" of jobs to be done today. My button to get to this Layout has the following script. (It won't let me cut and paste, so I'll paraphrase my code) Enter Browse Mode Go to Layout (Daily Report) Perform Find (Date [//} (Which brings up a Found Set for the current date) Sort Records (by Start Time) Scroll Window (Home) This works fine and dandy... TODAY. But, let's say I want to pull up this report for Yesterday, or Tomorrow, or The 4th of July? My thoughts are to put a field in the Header for Date with a pull-down calendar to switch dates. But, do I auto fill it? Do I use the date field from the actual table? Do I create a new field? And, do I need some button action to refresh once I pick a new date?
July 2, 201114 yr Use a global date field to specify the date of the report. Then modify your script to: ... Go to Layout [ Daily Report ] Enter Find Mode [] Set Field [ YourTable::Date ; AnyTable::gReportDate ] Perform Find [] ... do I need some button action to refresh once I pick a new date? You can attach a script trigger to the gReportDate field.
July 2, 201114 yr Author I think I got that. I created a globalDate field (first time with a global field), and it is in the current table. (not sure if it needs to be outside of all the tables, or how to do that) Then, I dragged that field to the Header (complete with drop down calendar to enter date) Am I supposed to autofill it first with today's date? Then I did the "set field" script command to set the date within my current table to that value in the globalDate field. (Won't that be editing my records?) Then I still have the search looking for date[//}. What should that be? My thoughts are to just change the perform find to "date[globalDate]" (though I don't see a way to do that) Does that sound right?
July 2, 201114 yr A global field can be in any table. Am I supposed to autofill it first with today's date? Not sure what you mean by that. You can set the field to current date when you initiate the script. However, if you wish to change the default, you must create an opportunity for the user to do so. Then I did the "set field" script command to set the date within my current table to that value in the globalDate field. (Won't that be editing my records?) No, not if you are in Find mode. Then I still have the search looking for date[//}. What should that be? Nothing. Instead of performing find with stored criteria, you enter the criteria while in Find mode, then Perform Find without restore.
July 2, 201114 yr Author Ah, "Find Mode" I get it now. I appreciate your patience. Most of this should be obvious.
Create an account or sign in to comment