5 Replies Latest reply on Feb 16, 2012 10:02 AM by comment

    Get text from Layout


      Is there a way to get all the written text on a layout?


      Like field label and Merge Variables.



        • 1. Re: Get text from Layout

          For what purpose?



          • 2. Re: Get text from Layout

            For what purpose?

            • 3. Re: Get text from Layout

              Lol 2 people with same response.  Ok when FM 11 first came out there were merge variables.  The merge variables when empty would display, their text as <<$$mergeVariable>>. So I came up with a technique that would be like this   <<$$currentdate>>.  Then I have a CF that use the Self function to get the text and then it would change the variable to get(currentdate).  Filemaker Patched this so that when a Merge Variable was empty it would be blank.  So it broke my method.  (The merge variables were broke, so fixing them broke me;)  )



              So I found a way of fixing this so I can set the variables to their own text and then use then use the CF.  I found this technique was useful because thru strict naming conventions I am able to display data effectively.  Recently I added the ability to execute SQL thru the merge variable.


              So I made a calendar that shows the data with Merge Variable.  I have <<$$d0t0>> then <<$$d0t1>> etc.  I made a grid with all the dates and times.  With my technique I set a time stamp and then each merge variable 'knows' it self and make a calculation to get the right data.  So <<$$d3t5>> gets it self and says  "I am 3 days after the date from time stamp and I am 4 time slots (each time slot is 15 minutes) after the time in the time stamp.  So if timestamp is Jan 1, 2012, 12pm, <<$$d3t5>> will Be what event event is at jan 4 1pm.  the So in essence I have a grid.


              In this way I only need to change the text of the merge variable and it know what to do on its own.  The issue is that I need to set the merge variable to them selfs first.


              ---- So if I cant get all the text from the layout I can run a script to go thru and set all the variables dynamically.


              This sound a bit complicated.  As soon as I finish my demo I can up load it.



              • 4. Re: Get text from Layout

                kaostika wrote:


                This sound a bit complicated. 


                Yes, it does - and the real purpose behind the exercise is still not clear. FWIW, you can get the contents of named text objects through the GetLayoutObjectAttribute() function.

                • 5. Re: Get text from Layout



                  Here is a video where I explain how to use SQL in merge variables.   I am now using this to make a calender that is really fast.  So I dont need to use "records" and "fields" to display the infomation in the calander.  I just use the variables to get the SQL directly.  Here is a screen shot of the matrix I am using. 


                  I am going to try to GetLayoutObjectAttribute and see if it works.  I think you need to have all these objects names.  I will see if it works.


                  Sql Calendar.jpg