Re: Check for empty records? Speed

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Check for empty records? Speed

Jeffrey R Gorman
Hi All,

Would it be quicker to do this?

> Loop
>  If Field_RecordID is not between 1 and 99999
>    delete record
>  End If
> End Loop


Thank You,
Jeff

--
Princeton: 609-683-3622, f: 609-683-3612
New Hope: 267-697-1622, f: 267-697-1621
Thank you for using Creative Computing
<http://www.creativecomputing.com>

> On May 25, 2017, at 4:03 PM, [hidden email] wrote:
>
> Message: 1
> Date: Thu, 25 May 2017 14:48:44 +0000
> From: Hans Gunnarsson <[hidden email]>
> To: Filemaker Experts <[hidden email]>
> Subject: Re: Check for empty records?
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=utf-8
>
> Once I started taking a close look at the data, as it is being imported from an Excel document, I noticed that the following would work after the import is completed:
>
> Loop
>  If Field_RecordID is not between 1 and 99999
>    Set field Flag_Empty = 1
>  End If
> End Loop
>
> Enter search mode
>  Set field flag_Empty = 1
> Perform search
>
> Delete found set of records.
>
> Simple enough once your brain decides to do things the simple way.  :-)
>
> Another way I had thought of was to move the contents of all relevant fields into a list and then check if the list is empty.
> But that method would have been problematic because some records contained alpha numeric text.
>
> Kind regards
> Hans

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Check for empty records? Speed

Ben Levitan LLC
On this topic, when you do "delete record" or "omit record" where do you end up?  At the previous record or the next record. This doesn't seem consistent or something is screwy in my scrips when I do these loops.  I do a combination of omits and usually have some safe guards built in to make sure I haven't skipped a record.


Also, it gets screwy when I get to the last record and need to do an omit.  I get into endless loops.


If I have am stepping through records and do an OMIT.   Where am I after the omit?



Ben


sent from my IBM Selectric Typewriter
____________________________________________________






-----Original Message-----
From: Jeffrey R. Gorman <[hidden email]>
To: fmpexperts <[hidden email]>
Sent: Thu, May 25, 2017 4:39 pm
Subject: Re: Check for empty records?  Speed

Hi All,

Would it be quicker to do this?

> Loop
>  If Field_RecordID is not between 1 and 99999
>    delete record
>  End If
> End Loop


Thank You,
Jeff

--
Princeton: 609-683-3622, f: 609-683-3612
New Hope: 267-697-1622, f: 267-697-1621
Thank you for using Creative Computing
<http://www.creativecomputing.com>

> On May 25, 2017, at 4:03 PM, [hidden email] wrote:
>
> Message: 1
> Date: Thu, 25 May 2017 14:48:44 +0000
> From: Hans Gunnarsson <[hidden email]>
> To: Filemaker Experts <[hidden email]>
> Subject: Re: Check for empty records?
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=utf-8
>
> Once I started taking a close look at the data, as it is being imported from an Excel document, I noticed that the following would work after the import is completed:
>
> Loop
>  If Field_RecordID is not between 1 and 99999
>    Set field Flag_Empty = 1
>  End If
> End Loop
>
> Enter search mode
>  Set field flag_Empty = 1
> Perform search
>
> Delete found set of records.
>
> Simple enough once your brain decides to do things the simple way.  :-)
>
> Another way I had thought of was to move the contents of all relevant fields into a list and then check if the list is empty.
> But that method would have been problematic because some records contained alpha numeric text.
>
> Kind regards
> Hans

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Check for empty records? Speed

Tom Fitch
In reply to this post by Jeffrey R Gorman
Is there some reason you can't just do a Find for those records and
then delete them all at once? Why do you need to delete them one at a
time?

Tom Fitch
FileMaker Pro Certified Developer
Portland, Oregon


On Thu, May 25, 2017 at 1:39 PM, Jeffrey R. Gorman
<[hidden email]> wrote:

> Hi All,
>
> Would it be quicker to do this?
>
>> Loop
>>  If Field_RecordID is not between 1 and 99999
>>    delete record
>>  End If
>> End Loop
>
>
> Thank You,
> Jeff
>
> --
> Princeton: 609-683-3622, f: 609-683-3612
> New Hope: 267-697-1622, f: 267-697-1621
> Thank you for using Creative Computing
> <http://www.creativecomputing.com>
>
>> On May 25, 2017, at 4:03 PM, [hidden email] wrote:
>>
>> Message: 1
>> Date: Thu, 25 May 2017 14:48:44 +0000
>> From: Hans Gunnarsson <[hidden email]>
>> To: Filemaker Experts <[hidden email]>
>> Subject: Re: Check for empty records?
>> Message-ID: <[hidden email]>
>> Content-Type: text/plain; charset=utf-8
>>
>> Once I started taking a close look at the data, as it is being imported from an Excel document, I noticed that the following would work after the import is completed:
>>
>> Loop
>>  If Field_RecordID is not between 1 and 99999
>>    Set field Flag_Empty = 1
>>  End If
>> End Loop
>>
>> Enter search mode
>>  Set field flag_Empty = 1
>> Perform search
>>
>> Delete found set of records.
>>
>> Simple enough once your brain decides to do things the simple way.  :-)
>>
>> Another way I had thought of was to move the contents of all relevant fields into a list and then check if the list is empty.
>> But that method would have been problematic because some records contained alpha numeric text.
>>
>> Kind regards
>> Hans
_______________________________________________
FMPexperts mailing list
[hidden email]
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
Loading...