Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There are loads of ways to do it. This is a quick way to get it to work.</p> <p>Let's say you have two tables like this:</p> <pre><code>Contacts Events -------- -------- ContactID EventID FirstName EventDate LastName EventDetails </code></pre> <p>Create a new link table between them that also stores the extra RSVP information you want.</p> <pre><code>RSVP -------- fk_ContactID fk_EventID PaymentInfo </code></pre> <p>Create a FORM table</p> <pre><code>FORM -------- ContactSearch cContactMatch = Calculation, If(isEmpty(ContactSearch) ; "ALL" ; ContactSearch) EventSearch cEventMatch = Calculation, If(isEmpty(EventSearch) ; "ALL" ; EventSearch) </code></pre> <p>Add the following fields to the Contacts and Events tables:</p> <pre><code>Contacts -------- cMatchField = Calculation, Stored, (FirstName + NEWLINE + LastName + NEWLINE + ALL + NEWLINE + Firstname LastName) Events -------- cMatchField = Calculation, Stored, (EventDate + NEWLINE + EventDetails + NEWLINE + ALL) </code></pre> <p>This means that the cMatchField for Contacts will look something like this:</p> <pre><code>John Smith John Smith ALL </code></pre> <p>In the relationship diagram, connect the tables like this:</p> <pre><code>FORM -------- cContactMatch = CONTACTS/cMatchText cEventMatch = EVENTS/cMatchText </code></pre> <p>Create a layout called FORM based on the FORM table. </p> <p>Add the fields ContactSearch and EventSearch to the layout. Add the PaymentInfo field.</p> <p>Add two PORTALS to the layout, one for the Contacts table, one for the Events.</p> <p>By default you should see all the records in each of these portals.</p> <p>Write a script, or use a script trigger, that refreshes the layout whenever one of those search fields is Exited/Modified. This should refresh the portals and show you the related records you're interested in.</p> <p>Add a button to each row in the portals and call a script that sets a global variable to that portal rows ID.</p> <p>For example:</p> <pre><code>Script: Set Selected Contact ID Set Variable ($$ContactID ; Contacts::ContactID) Script Set Selected Event ID Set Variable ($$EventID ; Events::EventID) </code></pre> <p>Add another button to the layout and a new script.</p> <pre><code>Script: Create RSVP # Check that a contact and event have been selected If(isEmpty($$ContactID) or isEmpty($$EventID) Exit Script End If # Get the payment info that has been entered Set Variable ($PaymentInfo ; FORM::PaymentInfo) # Create the RSVP Link record Go To Layout(RSVP) Create New Record Set Field(fk_ContactID ; $$ContactID) Set Field(fk_EventID ; $$EventID) Set Field(PaymentInfo ; $PaymentInfo) Commit Records Go to Layout (Original Layout) # Clear the search fields Set Field(PaymentInfo; "") Set Field(ContactSearch; "") Set Field(EventSearch; "") Set Variable($$ContactID; "") Set Variable($$EventID; "") Commit Records Refresh Screen </code></pre> <p>Phew.</p> <p>And you should be back, ready to search for Contacts, Events, and "Submit" the form to create more RSVPs.</p> <p>FileMaker is fun, eh?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload