FileMaker - Finding Primary Key of First Related Record -


i'm using script create new invoice record. i'd automatically set invoice's fclient fcontactid column id of client's first contact.

in script, how find/compute id of client's first contact? setfield calculated result of min(contact_invoice contact::contactid) didn't work.

tables:
client - primary key: clientid
contact - has foreign key: fclientid (a client can have many contacts)
invoice - has foreign keys: fclientid & fcontactid (an invoice associated 1 client , 1 of that client's contacts)

thank you,
ben

you want set "fclientid", description sound more you're wanting set fcontactid. right?

if that's case, have invoice, related client, directly related contact. you're doing right, if it's not working context isn't right. context @ time invoice table, related contact needs accessible there.

you use auto enter calc instead of script set this. bonus let select valid context , related table.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -