4 Replies Latest reply on Mar 14, 2011 7:40 AM by one9lbhammer

    Invoice vs. Quote checkbox

    one9lbhammer

      Title

      Invoice vs. Quote checkbox

      Post

      FMP 11

      Mac OSX 10.6.6

      I have an "Order Form" layout that displays garments from my "Invoice" layout.

      What I need to do is create a "Quote" checkbox that stops the info from displaying on the "Order Form" layout when checked, so that we don't order shirts that are only being quoted.

      Currently we are using a separate database for quotes, then when someone places an order we have to go to the Invoices DB and manually reenter the data from the Quote DB.

      Is this possible, and if not, then is there another solution that I'm just missing?

      Thanks!

        • 1. Re: Invoice vs. Quote checkbox
          philmodjunk

          If you have a single value checkbox [ ] Quote,

          Then you can either use layout script triggers such as OnRecordLoad and OnLayoutEnter to prevent a Quote record from being displayed on the order layout. It can omit that record from your found set, display and error dialog via show custom dialog and/or switch to a different layout.

          A simple If step can use this test to check the value:

          If [Table::QuoteField = "Quote"]

          I think you can also set up a more robust level of protection using Manage Security to keep a record with "Quote" in this field from being viewd on the Order Layout.

          An expression like this might work for record level access control:

          QuoteField ≠ "Quote" or Get ( LayoutName ) ≠ "Order Layout Name in quotes"
          You'll need to test this to make sure the Get funtion works correctly in such an expression as I haven't tried that.

          For more on how to set this up, see "Editing record access privileges" in FileMaker Help and check out this particular sub section: "Entering a formula for limiting access on a record-by-record basis" for a detailed description of how to set this up.

          • 2. Re: Invoice vs. Quote checkbox
            one9lbhammer

            Thanks for the quick response!  I got the first option to work on the test solution, but when I added it to the working invoicing solution it wouldn't work at all. I tried several different variations, and after about 5 hrs. of bashing my skull against my desk, this is what I came up with.  

            Enter Find Mode []

            Set Field [INVOICE:QuoteCheckbox; "Quote"]

            Omit Record

            Perform Find[]

            I don't have any idea why I couldn't replicate the results from the test solution, but alas.

            Now that I have it working, is there any way to only print the checkbox when it's checked?  This will help us differentiate between Invoices and Quotes.

            Thanks for everything.  If not for this forum I would've given up on this program ages ago.

            • 3. Re: Invoice vs. Quote checkbox
              philmodjunk

              A plain text version of this field could be formatted with conditional formatting to match the layout background when Get (windowMode ) = 3 and the field = "Quote".

              There are several "visibility tricks" you can experiment with that can hide any object on the layout from view:

              How to invisible a button

              • 4. Re: Invoice vs. Quote checkbox
                one9lbhammer

                At the top of the invoice through conditional formatting, I now have an alternating header that reads Invoice when the button is not clicked and Quote when it is.  Once again, thanks for all of your help.