4 Replies Latest reply on Jan 6, 2016 7:26 AM by beverly

    Preslug an answer document


      I am a teacher, and I would like to use Filemaker to preslug answer documents (like a ScanTron form) for tests and competitions. For example, if the first number of a student ID is "1" [ in a calc field where IDpos1 = Left ( ID ; 1 ) ], I want a small rectangular shape (W:15pt, H:4pt, no line, solid black fill) to appear on the layout at Left: 43.5pt, Top:91.5pt to "bubble in" the corresponding rectangle.  However, if the first number of the student ID is "8", I would want the rectangular shape to appear on the layout at Left: 43.5pt, Top: 171.5pt. to fill in its corresponding rectangle


      Is there a way to place such objects to a layout conditionally based on the data in the record?


      I think I could almost figure a solution with a Value List and either a Checkbox set or Radio buttons set, except that I can't (or don't know how to) control the dimensions, fill, or spacing of those field behaviors with the precision I need in order to match the layout of the printed form.


      Any help is appreciated.

        • 1. Re: Preslug an answer document

          I can work up a demo if needed, but basically this is my tip:

          1. create an object by typing a SPACE character on the layout. this will be "invisible".

          2. set the fill color to black (or whatever color you need) - I say fill with color, so it's easier to find in Layout Mode

          3. resize and reposition using Inspector (and/or manually) and LOCK, so that you don't accidentally type into the object again.

          4. use Conditional Formatting to "hide" the object (change fill to none) based on your formula, for example

          Left ( ID ; 1 ) ≠ 1 // HIDE when the value is NOT 1 - so it shows when the first character IS 1


          Why this works:

          Not all objects can use Conditional Formatting, but TEXT is one object that does. The space character is text, but shows nothing. Using the opposite of your test allows you to show the object if the condition is met.


          (I do something similar - the space character - and set the conditional opacity to 25-50% of the background color when I want an overlay to "dim" an odd-shaped object underneath.)


          If you need other shapes, then icon buttons may work as well with Conditional Formatting.



          • 2. Re: Preslug an answer document

            Thanks, Beverly!


            I got a similar answer last night in the main Discussions thread. A little simpler (I think one or two fewer mouse clicks), and also allowed me to use my rectangle shape rather than create a text object. There is a part of the Inspector window under the Data tab that says "Hide object when". I used a formula with similar syntax as yours to hide the object when the target field does not equal 1.


            I am already using Conditional Formatting to change colors of scores (i.e. gold and bold when ranked first, silver and bold when ranked second, bronze and bold when ranked third), but I hadn't even thought of creating a "blank" text object with black fill and applying Conditional Formatting. I will definitely have to remember your thoughts on Conditional Formatting. It could definitely give me more flexibility in other situations than simply print or hide.



            • 3. Re: Preslug an answer document

              Ok, what is the link to that thread?

              The advantage of the Conditional Formatting over "Hide object when", is that you can change more than fill (to none).

              • 4. Re: Preslug an answer document

                Never mind, I see Mike's answer here:

                How do I preslug an answer document?


                Mike's correct if you just need to hide (which works with more objects than Conditional Formatting).