4 Replies Latest reply on Jan 15, 2018 4:03 AM by ALandl

    Hide empty fields with empty drop-downs

    ALandl Apprentice

      We have some categories that have no associated subcategories.

       

      Is it possible to hide the subcategory field on the incident form when there are no subcategories to pick from?

        • 1. Re: Hide empty fields with empty drop-downs
          IJU Apprentice

          Hello ALandl,

           

          there might be an option but you'd need to fiddle around a bit.

          You could try to create a new boolean field "SubCategoryAttached" in the "Category" Business Object which stores whether there is any SubCategory attached to that Category or not. After creating the field all you need to do is to create two triggered actions in the Category Business Object which get triggered by the Link- and Unlink of an SubCategory. The triggered action then triggers an Update Action which updates the "SubCategoryAttached" field via ChildFold: Set the field to true if the ChildFold returns 1 or more. Else set the field to false.

           

          Now build a equivalent field in the Incident (or whatever Business Object you're using a category and subcategory) and let it be updated by a Editing Rule whenever the Category is updated: Expression: $([OtherObject]SubCategoryAttached)

          You can use the field to control the visibility of the SubCategory on the form.

           

          Complicated but the only way I can think of for now.

           

          Kind regards

          Immanuel Jungheim

          • 2. Re: Hide empty fields with empty drop-downs
            ALandl Apprentice

            Thanks for the reply.

             

            Yes I can see that working, but since I would also have to create the relationship between category and subcategory (they are not related out of the box), I don't think I will use such a complicated solution for what is really just a minor annoyance.

            • 3. Re: Hide empty fields with empty drop-downs
              IJU Apprentice

              Hello ALandl.

               

              You're right. Pretty complicated. Another solution could be to have a "dummy" Subcategory for all Categories which don't have any. Have the picklist set up to choose the only existing entry if there isn't any other. This would fill in the "dummy" when there's not other Subcategory. Your visibility rule could then hide the SubCategory field when there's dummy in the field. But again...as well complicated.

               

              Beste Grüße / Best Regards

               

              Immanuel Jungheim
              Consultant

               

              ITSM Consulting GmbH | Germany   | D-55294 Bodenheim   | Am Kuemmerling 21-25
              Mobile: +49 151 29256681   |   Tel.: +49 6135 9334 0   |   Fax: +49 6135 9334 22   |   E-Mail: [email protected]   | Web: www.itsmgroup.com

               

              ITSM Group – Be Better

              Geschäftsführer: Siegfried Riedel, Amtsgericht Mainz HRB 47740

              1 of 1 people found this helpful
              • 4. Re: Hide empty fields with empty drop-downs
                ALandl Apprentice

                I like this idea. Thanks for your help.