1 Reply Latest reply on Feb 7, 2011 9:53 AM by philmodjunk

    Related record or layout button

    BERGSTEN

      Title

      Related record or layout button

      Post

      Good morning!

      Wondering if there's a way I can tell a button to go to a related record on a separate layout while also telling it to go to the layout anyway if no related record is present.

      I have an invoice layout with customer IDs that link it to a company table with the same ids. I'd like to be able to use that button to go to the layout to see the current client or just go to the layout if I need to look something up, as not every invoice we enter has a client.

      Thanks!

      Kim

        • 1. Re: Related record or layout button
          philmodjunk

          You'd need to write a script for your button:

          From the Invoices layout you can do this:

          If [IsEmpty (CustomersTable::CustomerID) ] //if field from related table is empty there are no related records
             Go To Layout [//specify customers table]
             //do what else you want to do here, enter find mode, show all records or whatever.
          Else
             Go To Related Records[
          End IF