2 Replies Latest reply on Jul 30, 2013 7:13 AM by philmodjunk

    Check all records when open file



      Check all records when open file



           I want to look all my records when I open the file.

            If Field < Get Current date and field2 = working

           Show custom dialoge

           How can I look all the records and get custom dialoge for more then one record?

           Is it some kind of loop or can I use the Go to record/request page?

        • 1. Re: Check all records when open file

               If you have an unstored calc (result test) set to

               If (Table::DateField < Get (CurrentDate) ; "Late" ; "")

               then perform a find in your startup script for "Late" in that field, you will end up in a found set of those that are late.

               Your script can then look at the Get(FoundCount) and if >0 can go into your customer dialog...you will still be in the found set during the custom dialog.

               Finds are faster than loops.

          • 2. Re: Check all records when open file

                 Enter FInd Mode []
                 Set Field [YourTable::YourDateFIeld ; "<" & Get ( CurrentDate ) ]
                 Set FIeld [YourTable::Field2 ; "=Working" ]
                 Set Error Capture [on]
                 Perform Find[]
                 If [ Get ( FoundCOunt ) // records were found ]
                    Show Custom Dialog ["Records were found"]
                 End IF

                 See this thread for more examples of scripted finds: Scripted Find Examples