FrereGenetics Posted January 31, 2008 Share Posted January 31, 2008 Okay so I decided to go a different route with my previous problem I have a field called date of last order I want to find all records that occur between date of last order and today then move those to a new layout (called todays order) which i will then export to the web (this step i can do) then i set the date of last order to todays date so this can be done again next time (our orders do not occur on a fixed time basis) Quote Link to comment Share on other sites More sharing options...
AHunter3 Posted January 31, 2008 Share Posted January 31, 2008 Okay so I decided to go a different route with my previous problemI have a field called date of last order I want to find all records that occur between date of last order and today then move those to a new layout (called todays order) Records are not moved from one layout to another. You can manage various parameters of a layout so as to cause records of a certain description to be viewed there, and you can modify a set of records by changing field values so as to cause them to fall into the category of records you can view from a certain layout, or from a certain layout under certain circumstances. In the case you're describing, since your goal is to export, seems like what you'd want is a Find in another window that isolates the records by entering Find Mode then Set Field [YourTable::YourDateField, Date of Last Order & "..." & Get(CurrentDate)] then Set Error Capture [on] (in case there aren't any), then Perform Find []. Result is a found set of the records you want to export, so if Get(FoundCount)>0, export, restoring export order, end if. which i will then export to the web (this step i can do)then i set the date of last order to todays date so this can be done again next time (our orders do not occur on a fixed time basis) Well, since that bit of information — date of last order — is not per-the-record you'll need a place to store that particular piece of information. I think you'd need another table, ExportDates, so, in toto, I would do this: New Window Go to Layout ["ExportDates Layout"] Show All Records go to Record [last] Set Variable [$Last Export Date, ExportDates::Date] New Record/Request Set Field [ExportDates::Date, Get(CurrentDate)] Comment ["that stores today's date to be next time's 'Last Export Date' and also acquires last export date for today's purposes"] Comment ["now you're ready to find & export the records:"] Go to Layout ["OriginalTable Layout"] Enter Find Mode [] Set Field [YourTable::DateField, $Last Export Date] Set Error Capture [On] Perform Find [] If [Get(FoundCount) >0] ... Export Records [restore] End If Close Window [current window] Quote Link to comment Share on other sites More sharing options...
FrereGenetics Posted January 31, 2008 Author Share Posted January 31, 2008 Excellent! Thank you sir! I was able to get around the non-relational thing with a series of export imports 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.