No announcement yet.

Drop down menu in Entity's

  • Filter
  • Time
  • Show
Clear All
new posts

  • Drop down menu in Entity's

    Hi All

    We need to create a form that provides a Part Name drop down and when Part is selected we get another drop down with the Part numbers available.

    Fore Instance

    Part1 - 100-345
    - 100- 346
    - 100 - 347

    Part 2 - 200 -345
    - 200 - 346
    - 200 - 347

    Any thoughts on how we can do this.

    Thank you in advance


  • #2
    There isn't a "Category" "Sub-category" drop down available yet I believe. Only way I think you can do this now is to use "Conditional formatting" which will show/hide field as you select them. Unfortunately it will look quite ugly as there will be hidden field with a blank area.

    You probably have to use one of the Extension by a 3rd party developer: eymen.elkum


    • #3
      Thank you - Is there a how to guide for "Conditional formatting" ?


      • #4
        Not that I'm aware of. It seem fairly easy though because the GUI is quite straightforward. I haven't use it so don't have any personally input yet.

        Look under the Dynamic Logic area. Most if not all field will have that option when you go into Edit.


        • #5
          Do you want a dropdown (select) element where you choose one item ("product category" for example) and depending on that choice ("computers" for example) then a second dropdown displays all items classified as "computers" ?


          • MATO
            MATO commented
            Editing a comment
            Yes that is exactly what I am looking for.

          • telecastg
            telecastg commented
            Editing a comment
            I think this free extension  will do the job, check the README page for instructions on how to use.

            It basically allows you to write plain vanilla SQL and placeholders as data source for a select element in the entityDefs file.
            Last edited by telecastg; 02-28-2020, 07:58 PM.

          • MATO
            MATO commented
            Editing a comment
            Hi Telecastg

            I get a error 404 on that link.

            Thank again


        • #6
          Sorry about the mispelled link, here's the correct one


          • #7
            I have having difficulty with this extension. I have an standard enum "industry" and use this to populate a dropdown "profession" based on industry value, but no values appear.
            The sql works and returns values. Am I missing something extremely obvious?

            From opportunity.json

            "profession": {
            "type": "enum-from-sql",
            "options": [],
            "style": {},
            "default": "",
            "isCustom": true,
            "selectSQL": "SELECT job_professions.profession AS profession FROM job_professions WHERE job_professions.sector = '@@{{industry}}/@@' order by job_professions.profession"



            • #8
              Hi nickh,
              I've noticed that you are looking on how to manage the enum fields menu based on another option. I think it is not possible to do via request to DB. Please investigate this topic


              • #9
                Hi Maximus
                Thanks for this. The issue I have is that 1 industry can lead to 50 professions and up to 400+ fields of expertise - there are two fields whose options rely on the previous field value. altogether there are 20 industries, 441 professions and over 2000 fields of expertise. Manually entering is hazardous which is why I was looking to populate the fields using a sql query.
                Do you have any other suggestion?


                • #10
                  Hi Maximus
                  Is this more what I am looking for?


                  • #11
                    This post applies to Link-multiple connections (see relationship
                    The article provided by me applies to multi-enum fields

                    If you are not using relationships but multi-enum fields, you cannot make a query to your DB, because DB doesn't store all options of the current enum type field. DB stores only a saved enum field value for each personal entry. I agree that using the dynamic condition through UI for such a big list is an incredibly hard way. To avoid using the dynamic logic via UI, you can try to make your custom dynamic logic through code. This way needs some coding skills but it is much better for maintaining these fields logic and make some changes.
                    Please read this


                    • #12
                      Thanks Maximus Will study and decide best way forward.


                      • #13
                        Hi nickh,
                        I've made a tutorial of how to make the dynamic logic on the code layer I hope it will be helpful. In your case, you have a long enum field, so I assume that building dynamic logic via code is the best solution for you.


                        • #14
                          Hopefully final question Maximus
                          Am using the more basic option - can I have the option to "Allow Custom Option" when the list is conditional as attached?


                          • #15
                            If 'Allow Custom Option' checked, then a user can add custom values (not defined by Options parameter) by typing text and pressing the enter key. So it will allow you to add your options upon inline edit.