6 Replies Latest reply on Feb 8, 2017 9:18 AM by Jamie Cannon

    Display Radio buttons on webdesk instead of dropdown list

    Apprentice

      Hi,

       

      I am designing a survey form wherein I need to display options in Radio button instead on Dropdown list.

      I have selected Display as Radio button TRUE in Window Manager on Survey window. I can see radio button on that window but on web desk I still see the options in dropdown list instead of the radio buttons.

       

      How can I display Radio buttons on webdesk?

        • 1. Re: Display Radio buttons on webdesk instead of dropdown list
          sandeepbratch Apprentice

          Hi Himani,

           

          Radio buttons aren't supported in Web desk so they will always display as a list.  I've used booleans with a caulcation to enforce at least one being checked and that has worked well in the past.

           

          Thanks,

          Sandeep

          • 2. Re: Display Radio buttons on webdesk instead of dropdown list
            Apprentice

            Okay. Can you help me with that calculation?

            • 3. Re: Display Radio buttons on webdesk instead of dropdown list
              Tomas.v Apprentice

              HI Himani.

               

              You don't need to use calculation. You can, but I think that there is much easier solution.

               

              In the Object Designer, select the Boolean atribute and set the following:

              Default Value: False

              Is Mandatory?: True

               

              I suggest that you keep "True Text" and "False Text" blank (default values are True and False).

               

              If you do this, the atribute will show as Radio button in WebDesk, SelfService, Console and in a Workspace.

               

              Hope it helps.

               

              Tomas

              • 4. Re: Display Radio buttons on webdesk instead of dropdown list
                Rookie

                Hi Tomas!

                 

                Would you mind elaborating on your last post?  I thought that radio buttons were a complete "no-go" in Service Desk, but are you suggesting that Boolean values can be represented using radio buttons somehow?

                 

                 

                Thanks,

                Steve

                • 5. Re: Display Radio buttons on webdesk instead of dropdown list
                  andrew.strakis Apprentice

                  SHellmueller

                   

                  Tomas has suggested they will look like Radio buttons to an end user but are not actually displayed as a Radio button. I assumed I would have radio buttons in web access (as the Designer document from Landesk doesn't say this isn't for WebAccess) and then stumbled across this article...

                  Problem with this method for me is I don't want to have to add in 4 query filters for my end users to report on these. If I follow Tomas' suggestion I would create 4 Boolean attributes > On the Window change each attribute label to display the following:

                  • Boolean 1: 1-5
                  • Boolean 2: 6-10
                  • Boolean 3: 11-15
                  • Boolean 4: 16+

                  The user would tick Boolean 1 and I'd write a Calculation to make 5 fields appear on the window to fill out > When the manager wants to report on how many 1-5 was raised last month the query filters will be 4 lines longer, then the columns will be 4 more and all the data squishing in one screen. I just want one drop down and one column with the answers in. Radio button, better for end users, list box, better for analysts. I'm on version 7.7.3 so my best option is List box (Ordered List).

                  • 6. Re: Display Radio buttons on webdesk instead of dropdown list
                    Jamie Cannon ITSMMVPGroup

                    Radio buttons are not supported in the web, only the console. If you want to use booleans (checkboxes) the same way you'd use radio buttons, here is how you could write that.

                     

                    Create your attributes with the following (repeat for as many as needed):

                    Boolean 1 - Type = Boolean, Default Value = false, Mandatory = true, Backfill (if asked) = false.

                    Boolean 2 - Type = Boolean, Default Value = false, Mandatory = true, Backfill (if asked) = false.

                    Boolean 3 - Type = Boolean, Default Value = false, Mandatory = true, Backfill (if asked) = false.

                     

                     

                    Create a dynamic window calculation attribute:

                    DW Show Booleans - Type = String, Max Length = -1, Calculation Type = Windows Calculation, Dependencies = Boolean1,Boolean2,Boolean3...

                         Calculation:

                     

                    import System

                    static def GetAttributeValue(Incident):

                         HideBoolean1 = false

                         HideBoolean2 = false

                         HideBoolean3 = false

                     

                          if Boolean1 != null:

                              if Boolean1 == true:

                                  HideBoolean2 = true

                                  HideBoolean3 = true

                     

                          if Boolean2 != null:

                               if Boolean2 == true:

                                  HideBoolean1 = true

                                  HideBoolean3 = true

                     

                          if Boolean3 != null:

                               if Boolean3 == true:

                                  HideBoolean1 = true

                                  HideBoolean2 = true

                     

                         Commands = ':SetHidden(_Boolean1,{0});:SetHidden(_Boolean2,{1});:SetHidden(_Boolean3,{3});'

                     

                         return String.Format (Commands,HideBoolean1, HideBoolean2, HideBoolean3)

                     

                     

                    Then add these attributes to your form including the DW attribute.  On the booleans, set the property of "Is Calculate on Change" to TRUE and set the property for the DW (show on window = FALSE)

                     

                    Now, once you have all this, when you select Boolean1, 2 and 3 will hide.  If you uncheck 1, 2 and 3 will show.  Alternatively, if you want to just make them ReadOnly, in the calculation above, replace the "SetHidden" with SetReadOnly.  This way if you select 1, 2 and 3 become ReadOnly.

                     

                    Hopefully this will help.

                    1 of 1 people found this helpful