5 Replies Latest reply on May 27, 2014 3:04 PM by philmodjunk

    what kind of field to receive text from buttons ?



      what kind of field to receive text from buttons ?


           I need to fix a medical database 

      the main problem is how to organize the database relationship graphs because I am lost in so many tables and specially the table occurrences ( differentiate what comes from what) .

      Which leads to the question itself ---> how to replicate a particular mechanism of tables , table occurrences, etc in order to handle buttons to fill 

      a) a portal ( as already implemented)

      b) a "BOX " ( container field, text field, what else could be  ? ) 

       which receives pre formatted text ( stored by these buttons)  in order to make a text

      ( in this case a progress medical note ).


      Basically the problem is related to organize the structure of the database 

      1) which are the tables and which are the table occurrences from what --> without that I cannot add new buttons

      2) I need to make a field ( box ) that receives preconfigured text

      a) Choose from buttons that will fill up a box containing text 

      A very important matter  is that the field in the "BOX" must be "retouched" without changing the text contained in the button ( by that I mean the text assigned to that button). 



        • 1. Re: what kind of field to receive text from buttons ?

               I don't see what is the problem here. On Manage | Database | Relationships, EVERY "box" is a table occurrence. What matters is:

               a) How the occurrences are linked in relationships

               b) The table occurrence specified in Layout Set up | Show Records from, this establishes the "context" under which references to other table occurrences evaluate and also control what Found set, current record and sort order is in place for that layout.

               c) the table occurrence specified in Portal Setup|Show Related Records From. The relationship--even if it is produced by a "chain" of table occurrences--linking that table occurrence to the once specified in b) above determine what data appears in unfiltered portal and also some of your options for adding new records. A portal filter then controls whether the records shown will be limited to a subset of what would appear if the portal were not filtered.

               c) The table occurrences specified for your value list in Manage | Value lists. You select two table occurrences there when selecting the "Use values from a field" option. The drop downs at the top specify one table occurrence (rarely two) and the "include only related values, starting from" option can specify an additional table occurrence.

               The key is that in very, very few places where FileMaker tells you to select a table are you actually selecting a table. Instead, you are selecting a table occurrence.

               See this thread for more on table occurrences: Tutorial: What are Table Occurrences?

               I generally color code and use naming conventions to identify the data source table for each. I make all occurrences with the same data source table the same color and I might name a table occurrence: Inv_LineItems|All, Inv would refer to the "anchor" table occurrence in the group, LineItems would match the name of the data source table and |all would be an added detail to help me know that this particular table occurrence is linked to Invoices by the X operator and thus any record in Invoices matches to all record in Line items via this specific relationship.

               And yo may find that using Anchor Buoy helpful: http://sixfriedrice.com/wp/six-fried-rice-methodology-part-2-anchor-buoy-and-data-structures/

          • 2. Re: what kind of field to receive text from buttons ?

                 Hi Phil


                 Thank you very much for this insight - really will help.


                 But what about the second question : what kind of field you suggest  to add text "contained" in buttons ?

                 what I like to emulate is this:


                 any ideas ?



            • 3. Re: what kind of field to receive text from buttons ?

                   I can't make out any details of that image and do not understand the question. What do you mean by a field for text "contained" in buttons? In most cases, you do not need any field at all though a simple text field can be used to show text that can then be changed by a script. But a merge variable might also be used and then you do not use any field. You can also layer layout text on top of the button with conditional formatting or "hide object when" settings that ensures that only one layout text object is visible at a time.

              • 4. Re: what kind of field to receive text from buttons ?

                     Hi Phil,


                     Let me re-phrase and explain better what I would like to achieve.


                     What I would like to do is a Medical Progress Note. ( the Yellow box you see in the picture)

                     It should work this way:  I have several buttons ( for instance: a button called "better",   when this button is clicked it should fill a field

                     with some phrase like : the patient refers that he is filling better with this treatment" )

                     But imagine you have several buttons that clicked in a given order will construct a text like:


                     Progress Note for May 27 , 2014


                     The patient John Doe refers filing better with this treatment despite some minor side effect such as slight headache and nausea

                     Besides, he denies  symptoms like fainting or epileptic fits


                     bla bla bla bla

                     etc etc


                     Now , Phil , this is my status:

                     I have the mechanism to control the buttons ( tables, relationships , etc)

                     But I don't now what kind of field should be used in order to receive the text and put the in coherent way ( i.e. construct the text )

                     ( Should be that famous yellow box of the picture )


                     I already now how to put them line by line using a portal but ( like in prescriptions : one medication per row)


                     Here is different :

                     How  to "construct " a text clicking in buttons, and  very important, this field should allow not only the text "behind" the buttons but also modifications

                     ( not every patient has the same problem , as you know )


                     What is your advice ?

                     Thanks a lot 




                • 5. Re: what kind of field to receive text from buttons ?

                       The field you'd use is a text field. Your buttons can use either an Insert text script step to insert text so that it is appended to the end of the text field or you can use Set Field like this:

                       Set Field [YourTable::MedicalProgressNote ; YourTable::MedicalProgressNote & " The patient reports feeling better." ]