dbTalk Databases Forums  

Finding records by relationship vs. Find FM5

comp.databases.filemaker comp.databases.filemaker


Discuss Finding records by relationship vs. Find FM5 in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bilbod
 
Posts: n/a

Default Finding records by relationship vs. Find FM5 - 12-04-2009 , 11:25 AM






Hello,
I'm wondering if anyone would weigh in with an opinion. I have a
database of invoices, some paid up, some with outstanding amounts. I'd
like to most efficiently go to a layout showing only those with
outstanding amounts. Could create a self-relationship, between a
global, say "1" and records that have a "1" based on whether there is
any outstanding $. I know I shouldn't use a calc field to check
whether an invoice is paid up, so, could a better way be to do a calc
replace on a field, "If PAID, 1, 0" and base the self relationship
from that field to the global? Maybe the global should be an auto
enter number field instead.
Thanks,
Bill

Reply With Quote
  #2  
Old   
KevinSmith
 
Posts: n/a

Default Re: Finding records by relationship vs. Find FM5 - 12-07-2009 , 05:49 PM






Hello Bill

My elders and betters have not responded in last two days, so I'm
going have a go at answering your question.

On Dec 4, 5:25*pm, bilbod <bjay... (AT) montanaport (DOT) net> wrote:
Quote:
Hello,
I'm wondering if anyone would weigh in with an opinion. I have a
database of invoices, some paid up, some with outstanding amounts. I'd
like to most efficiently go to a layout showing only those with
outstanding amounts. Could create a self-relationship, between a
global, say "1" and records that have a "1" based on whether there is
any outstanding $.
I would like to suggest that instead of using a "go to related record"
step to find paid records you use the find function instead.
Pseudocode:
Enter find mode,
Set field [Payment flag, 1]
Perform Find
The advantage is there are no additional relationships to create.


Quote:
I know I shouldn't use a calc field to check
whether an invoice is paid up, so, could a better way be to do a calc
replace on a field, "If PAID, 1, 0" and base the self relationship
from that field to the global?
I don't see a problem with creating a calc field defines as follows:
Amount_Due - Paid_Amount>1. That works and is efficient. The
disadvantage of using the replace function is that it goes out of date
the moment any new payments are made. It relies on you running the
replace function before every search; very inefficient.

Quote:
Maybe the global should be an auto
enter number field instead.
No, a global field is right. You'll only need the global though if you
plan to use the "go to related record" approach you suggested. It
won't be necessary for the find script that I'm proposing.

Quote:
Thanks,
Bill
Regards
Kevin Smith

Reply With Quote
  #3  
Old   
Your Name
 
Posts: n/a

Default Re: Finding records by relationship vs. Find FM5 - 12-07-2009 , 06:26 PM



On Dec 4, 5:25 pm, bilbod <bjay... (AT) montanaport (DOT) net> wrote:
Quote:
Hello,
I'm wondering if anyone would weigh in with an opinion. I have a
database of invoices, some paid up, some with outstanding amounts. I'd
like to most efficiently go to a layout showing only those with
outstanding amounts. Could create a self-relationship, between a
global, say "1" and records that have a "1" based on whether there is
any outstanding $. I know I shouldn't use a calc field to check
whether an invoice is paid up, so, could a better way be to do a calc
replace on a field, "If PAID, 1, 0" and base the self relationship
from that field to the global? Maybe the global should be an auto
enter number field instead.
Why over-complicate it with a Relationship?

Create the calculation field that indicates whether the invoice is
outstanding or not, and then create a simple Script that performs a Find on
that field.
e.g.
Enter Find Mode []
Set Field [c_Outstanding; "Yes"]
Perform Find []
Go to Layout[ListView]

You can assign this Script to a button and / or keyboard shortcut.

Helpfull Harry )

Reply With Quote
  #4  
Old   
bilbod
 
Posts: n/a

Default Re: Finding records by relationship vs. Find FM5 - 12-07-2009 , 07:44 PM



Thanks Kevin,
I really appreciate your stepping in....and Harry concurs!
I've been rusty with finds at times.
Best,
Bill
> Kevin Smith

Reply With Quote
  #5  
Old   
bilbod
 
Posts: n/a

Default Re: Finding records by relationship vs. Find FM5 - 12-07-2009 , 07:45 PM



Thanks Harry,
Very straightforward.
Best,
Bill
Quote:
Helpfull Harry * )

Reply With Quote
  #6  
Old   
jahn
 
Posts: n/a

Default Re: Finding records by relationship vs. Find FM5 - 12-08-2009 , 10:30 PM



Actually, I think a relationship is the way to go and doesn't
complicate things at all. If you're going to create a calculation
field per the recommendations above, you might as well set up the
relationship. Then your button consists of one step: go to related
records using your list view. This seems to me cleaner and more
elegant than a find, which adds the burden of writing a script,
switching modes and setting a field. If it's just you using the
database, it's six of one, half a dozen of the other; but if it's for
non-tech users, then going to related records eliminates the blinky
interface you get when switching modes.

-J.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.