13 Replies Latest reply on Nov 5, 2015 2:13 AM by Mike_Mitchell

    Text underlining as a field?

    inspectorjack

      Hello all,

       

      I am trying to determine if Filemaker is the correct solution for me.  Years ago I used FMP to create relatively simple relational databases for vendors, customers, jobs, and purchase orders for my building business.

       

      I am a single person business that relies on a very old piece of software, Omni Form 5.0 that I must get a way from.  I use a 20 page form filler in which much of my input is underlining a characteristic IF it exists in the property I am documenting.  Can Filemaker have have "clickable" underlinings?  They really don't have to have filed values but True or False would be useful also.

      sample form.jpg

       

      Thanks in advance for the help.

        • 1. Re: Text underlining as a field?
          Mike_Mitchell

          Hello, Jack.

           

          I'm not 100% sure what you're asking here, but depending on the question, there are a couple of answers:

           

          1) FileMaker is certainly capable of adjusting the format of a text object or field based on a condition. This can be done through a calculation via Conditional Formatting or text formatting functions. You could write a script that makes the change easily enough.

           

          2) If you want to know if a "clickable" link can be created, then yes, that can be done too. There's a script step called Open URL, through which you can open a web page (plus do many other fun and interesting things). Simply attach a script to a button (which can be a text object) to launch the web page.

           

          So I guess the answer is "yes". Which "yes" is dependent on the question.  

           

          HTH

           

          Mike

          • 2. Re: Text underlining as a field?
            beverly

            any object (field, text, graphic, label) is "clickable". most can be set to underline (not graphics?)

             

            What you do from there is how you assign the 'action' for that "button". It can be a single script step. it can be a full script. it can open a popover (to display more information). it can have a "mouse-over" temporary display of information (called "Tool tip").

             

            And yes you can "toggle" a setting with a single-click to make it 1 or 0 (true/false).

                 Set Field (myfield, not myfield)

            The display of the number can be boolean as text "True/False"

             

            Or make the field text with any number of values that are selectable by checkbox, radio button, select list (drop down or pop up).

             

            Does that help? And welcome back to the community!

             

            beverly

            • 3. Re: Text underlining as a field?
              inspectorjack

              Looking at the form on the computer screen, none of the red underlines existing until the form is "filled".  So all characteristics have an "OFF" underline below them.  They are activated buy clicking them.  So at the top left I indicated that the access to the property is TYPICAL by clicking on that underline to make it active or "ON"  I have not underlined characteristics such as "restricted" access.

              • 4. Re: Text underlining as a field?
                Mike_Mitchell

                All very doable. You can set a parallel field for each field on the form called isUnderlined. It can be a simple number field. Then you can write a script to toggle the isUnderlined field on and off. It would look something like this (rough draft):

                 

                If [ not IsEmpty ( myField ) ]    // where "myField" is the field the user is clicking on

                     If [ IsEmpty ( isUnderlined_myField ) ]

                          Set Field ( isUnderlined_myField ; "1" )

                     Else

                          Set Field ( isUnderlined_myField ; "" )

                     End If

                End If

                 

                Then you would create a Conditional Formatting formula that would show the underlining for the field if the isUnderlined flag for that field is set to "1".

                 

                You could abstract this a little to make it easier to maintain, and I might be tempted to try to move the data model more towards a related table (rather than a form). But that's the general idea.

                 

                HTH

                 

                Mike

                • 5. Re: Text underlining as a field?
                  beverly

                  There is "conditional formatting" on text (in fields or not) - they can have red underline based on condition (changing to red underline based on formula). It the clicks are scripted, you can even 'disable' based on what you determine (not allowing click-through if all info associated with the "link/button" is valid, for example.)

                   

                  Things have changed great in latest versions of FM.

                  beverly

                  • 6. Re: Text underlining as a field?
                    inspectorjack

                    Thank you for the answers.  Although I am a little fuzzy on accomplishing what I think I need I am working on trial layouts with a trial version now.  I am trying to create a "proof of concept" of this now and this is NOT coming to me intuitively.  How would I create a toggle for an underlining for a text object such as is seen in the top left corner of the PDF I posted where "Typical" is underlined?

                    • 7. Re: Text underlining as a field?
                      Mike_Mitchell

                      Use Conditional Formatting, as we've already explained. Right-click on the text object and choose "Conditional Formatting". Choose "Formula" and use one of the formulas either Beverly or I gave you to tie the formatting to the selection flag.

                       

                      Then, you create a script that toggles the flag field, just like the one I gave you above. Tie the text object as a button (right-click and choose "Button Setup") to that script.

                      • 8. Re: Text underlining as a field?
                        inspectorjack

                        I see I can make any word a button and that would be perfect if clicking any word would toggle on or off the underlining which would need to be variable in length and RED regardless of color of text button (some are red and some are black and there is meaning in their color).

                        • 9. Re: Text underlining as a field?
                          inspectorjack

                          The available conditions are values or formulas.  I am not aware of a function associated with clicking.  Hmmm maybe a script could change from 0-1-0… sequentially on clicking.  Even so the conditional formatting does not seem to allow a RED underline only.  I guess its possible to be greyed or solid. That would require some adjustments for my customers.

                          • 10. Re: Text underlining as a field?
                            Mike_Mitchell

                            If your line has to be a different color, use a line object and the Hide Object functionality in the Inspector instead of Conditional Formatting.

                             

                            Screen Shot 2015-11-04 at 9.27.21 PM.png

                             

                            And yes, you use a script to toggle the field that turns the object on and off.

                            • 11. Re: Text underlining as a field?
                              inspectorjack

                              Each of 9 pages of my report has around 100 clickable underlines.  I'm have zero scripting experience in the last 20 years, so far scripting is quite the pain with non existent tables etc, It seems each potential underline will need their own value containers.   OR from your example 2 containers myField and IsUnderlined_myField?

                              • 12. Re: Text underlining as a field?
                                inspectorjack

                                I have the red underline working for one example using that script!  Strangely my test file has 3 records and the red line works only on the 1st record.   I also placed the field on the layout to watch the value cycle from 0 -1 and on and that value only displays on the 1st record as well. Why would that be?  It also does not work if I open the DB on my iPad.  It would seem each potential underline will need at least one field.  Very tedious to configure and script.  ITs a start.

                                 

                                Thank you,

                                • 13. Re: Text underlining as a field?
                                  Mike_Mitchell

                                  Yes, each underline needs its own separate field. You can relieve some of the pain by using Script Parameters. You can pass the name of the field / text object into the script and then extract it using the Get ( ScriptParameter ) function. The modified script might look something like this.

                                   

                                  Set Variable ( $targetField ; Get ( ScriptParameter ))

                                  If [ not IsEmpty ( Evaluate ( $targetField )) ]

                                       If [ IsEmpty ( Evaluate ( "isUnderlined_" & $targetField )) ]

                                            Set Field By Name ( "isUnderlined_" & $targetField ; "1" )

                                       Else

                                            Set Field By Name ( "isUnderlined_" & $targetField; "" )

                                       End If

                                  End If

                                   

                                  On each of your buttons, you then use the Script Parameter field to indicate the name of the field being used:

                                   

                                  Screen Shot 2015-11-05 at 5.12.26 AM.png

                                   

                                  This is located at the bottom of the Specify Script dialog.