6 Replies Latest reply on Sep 10, 2014 9:09 AM by NewBR

    Is it possible in FileMaker to add new form controls dynamically?

    NewBR

      Our enterprise database includes a functionality to allow end users define additional fields which are dynamically added to our field application, allowing to each user group to have a unique version of field application. Even custom valid values are allowed for these dynamic fields, so they show up as different form controls (drop down list, radio button, check boxes etc.).

       

      Is something similar possible in FileMaker?

       

      Can we allow dynamic customization to our FMGo application forms withut opening them in FileMaker Pro?

       

      I am aware of FileMaker's ability to automatically add new field controls on forms, however it requires me to open my solution in FileMaker and move new controls into correct loaction on layout. Other option is to create placeholders for additional fields, however in our application users could add hundreds of custom fields,

       

      I shall appreciate your thoughts.

       

      ~Raj

        • 1. Re: Is it possible in FileMaker to add new form controls dynamically?
          mark_scott

          Hi Raj,

           

          Just a thought: you might want to look into an Entity-Attribute-Value data model, which (with a fair amount of work on your end) potentially allows users to define and populate fields.  You could display those fields in a portal.  Different form controls for different user fields are probably not in the offing, however.  You wouldn't have to go completely EAV; use a more standard, normalized schema for your fixed fields, and an EAV model for the user-defined ones.  I would imagine that reporting gets more complex with this kind of design (especially the hybrid approach), so you'd have to weigh the trade-offs.

           

          hth,

           

          Mark

          • 2. Re: Is it possible in FileMaker to add new form controls dynamically?
            NewBR

            Thanks Mark -

            I agree about using portal display fields.  Question that I am stumbled upon is - once I have a record of field control attributes (field name, label, control type, vvl) how would I make FileMaker display specific control type without going into design mode in my app.  It should work as long as I only use a simple text control for everything.  As I write I am thinking maybe hiding all control types into portal would work, and a specific field value could work as a trigger to display specific control type in each row.

             

            thoughts?

            • 3. Re: Is it possible in FileMaker to add new form controls dynamically?
              keywords

              Re "Can we allow dynamic customization to our FMGo application forms withut opening them in FileMaker Pro?", I don't believe it is posible to create DB fields in FMGo.

              • 4. Re: Is it possible in FileMaker to add new form controls dynamically?
                TomHays

                NewBR wrote:

                 

                Question that I am stumbled upon is - once I have a record of field control attributes (field name, label, control type, vvl) how would I make FileMaker display specific control type without going into design mode in my app.

                 

                Instead of using a text field for everything, you could make a field for each type you support, e.g. UserField_Text, UserField_Number, UserField_Date.

                 

                Use the new "Hide object when" feature in FileMaker Pro 13 (Inspector --> Data --> Behavior) to display only one field at a time based on your user's field type choice.  Be sure to check the box for "Apply in Find mode" to keep the user's interface consistent.

                 

                After their behavior is customized, stack them one on top of another on the layout.

                 

                -Tom

                • 5. Re: Is it possible in FileMaker to add new form controls dynamically?
                  mark_scott

                  There you go, Raj.  Tom's suggestion is the way to make this work with multiple field-control types.  Another fine use for "Hide object when."

                   

                  Mind you, because, in the EAV model, these user-defined fields and their values exist as rows in a related table, rather than as columns in the current table, you're not going to be able to easily export or print the values as columns in the traditional sense (at least not without a lot of work).  FileMaker doesn't have a built-in cross-tab functionality, and, while their are a number of ways to turn rows into columns, most of the methods I've seen over the years depend on a pre-defined schema, rather than an open-ended one like this.  Of course, if printing and exporting are not important to your goals, then the issue is moot.

                   

                  Let us know how this progresses for you.

                   

                  Mark

                  • 6. Re: Is it possible in FileMaker to add new form controls dynamically?
                    NewBR

                    Thanks Mark and Tom.  Looking back at it, this issue started with FM v12 when Hide object option was not available.  Getting hold of questions in row format is not a problem since our SQL Server db already has it in that format. I have tested it in a simple solution.  It works well.  See attached.

                     

                    It works well on FM Go, except the calendar control.  Because the field type is text, FMGo offers default keyboard entry, instead of calendar entry. It works fine on desktop.

                     

                    FileMaker community rocks!!

                     

                    ~Raj