9 Replies Latest reply on Jun 13, 2017 6:52 AM by rgordon

    Dynamic Columns

    jibardhan

      Hi all

       

      i coming here after quiet a while . Was working on a Servoy project last 6 months.

      I want to have  dynamic columns to be shown on a layout .

      For example :- if the user selects 10 columns from a checkbox selection set , that columns only should appear in another layout with data in list view .

      *There is a solution for it . By taking column names as record's another column value and keeping data in their respective records.

      But , by this way , the DB will become heavy .Say , 1000 original records are there with 10 columns names selected . Then , we have to create 10*1000=10000 records in the DB.

       

      Is there any other effective way to accomplish this ?

       

      Thanks in advance.

      Jibardhan Patel

        • 1. Re: Dynamic Columns
          mikebeargie

          For example :- if the user selects 10 columns from a checkbox selection set , that columns only should appear in another layout with data in list view.

          This is pretty much the textbook definition of Table View in FileMaker. I would suggest using that, and training the users how to modify the view to show/hide available fields.

           

          Not really sure based on the rest of your post (language barrier) if that's actually what you need, but if you could post some drawings showing sample data as to what you are trying to achieve, it may be easier to understand and make a recommendation.

          • 2. Re: Dynamic Columns
            rgordon

            Here is a sample file that I think let's you do what you want.

            1 of 1 people found this helpful
            • 3. Re: Dynamic Columns
              jibardhan

              Thanks Mike for the reply .

              By using a Table view "Show/hide" ON fields , the alignment of fields in the "List" will be distorted.

               

              Example :-

              Checkbox set selection

              -------------------------------------

              1. Name field - checkbox selected

              2. Total field - checkbox selected

              3. cutter

              4. pencil

              5.pen - checkbox selected

              6.banner - checkbox selected

              7.cloth

              8.color

               

              In another layout , the list view will be :-

              Name | Total | pen | banner

               

              If "show/hide" option will be used , then :-

              Name | Total |  |  | pen | banner |  |   |

              • 4. Re: Dynamic Columns
                jibardhan

                Thanks rgordon . i shall take a look at the file.

                • 5. Re: Dynamic Columns
                  jibardhan

                  This looks good . But all the fields are unstored . I shall try to make it stored as these fields sall be used in other places . There also can be a solution with SetFieldByName and GetField  , i am trying it .

                  Many Thanks !!!

                  • 6. Re: Dynamic Columns
                    rgordon

                    The actual data fields can be stored. The global fields and calc fields are for display purposes and they allow you to edit what you see in the evaluate field.

                     

                    Roy Gordon

                    PSFE

                    Sent from my iPhone

                    1 of 1 people found this helpful
                    • 7. Re: Dynamic Columns
                      jibardhan

                      Thanks for the reply.

                      I have made it all stored.

                      • 8. Re: Dynamic Columns
                        chaseholden

                        Excellent job, Roy. Thank you.

                        Do you think there a way to use actual, modifiable fields in this columns and use variable column widths?

                        • 9. Re: Dynamic Columns
                          rgordon

                          With the sample file that I posted there isn't a way to do what you want. You could use tableview to accomplish what you want.  The user could select what fields to put on the layout and then adjust the column width and order of the fields.

                          2017-06-13_09-31-19.png.

                          1 of 1 people found this helpful