Forum Discussion

SebastianSzyroki's avatar
SebastianSzyroki
Copper Contributor
May 25, 2023
Solved

Create a drop-down column - SharePoint List

Is it possible to create an expandable column? What I mean is that for example I create a column "Category" in which I have two categories "IT Equipment" and "Training" (drop down list). After selecting "IT equipment" another table appears to complete "type of equipment" in which I can enter the name of the equipment and after selecting "training" another table appears to enter the name of the training. 

  • SebastianSzyroki If you want to show/hide columns based on selection of option from choice column, you can use conditional formulas in SharePoint.

     

    Let's say you created 3 columns: Category (choice column), TypeOfEquipment (Text), NameOfTraining (Text).

     

    Then you can conditionally hide TypeOfEquipment and NameOfTraining fields from list form based on value of Category column.

     

    Check this documentation: Specify conditional formula to show or hide columns 

     

    Example, for TypeOfEquipment column, you can use formula like: 

     

    =if([$Category] == 'IT Equipment', 'true', 'false')

     

    Where Category is the internal name of your SharePoint choice column.

     

    OR If you want TypeOfEquipment and NameOfTraining also of type choice columns, you can use Power Apps to customize list form and create cascading drop downs: 

    1. Working with Cascading Lists in SharePoint and Power Apps 
    2. Create dependent drop-down lists in a canvas app 

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

  • SebastianSzyroki If you want to show/hide columns based on selection of option from choice column, you can use conditional formulas in SharePoint.

     

    Let's say you created 3 columns: Category (choice column), TypeOfEquipment (Text), NameOfTraining (Text).

     

    Then you can conditionally hide TypeOfEquipment and NameOfTraining fields from list form based on value of Category column.

     

    Check this documentation: Specify conditional formula to show or hide columns 

     

    Example, for TypeOfEquipment column, you can use formula like: 

     

    =if([$Category] == 'IT Equipment', 'true', 'false')

     

    Where Category is the internal name of your SharePoint choice column.

     

    OR If you want TypeOfEquipment and NameOfTraining also of type choice columns, you can use Power Apps to customize list form and create cascading drop downs: 

    1. Working with Cascading Lists in SharePoint and Power Apps 
    2. Create dependent drop-down lists in a canvas app 

    Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

    • SebastianSzyroki's avatar
      SebastianSzyroki
      Copper Contributor

      ganeshsanap 

      and can i make a drop down list where i select several options and there are several fields to fill in? In this case, I can't have multiple selections in the Category column, I can only have one selection, then the note column appears conditionally.

       

      if I select two options from the category list, e.g. IT equipment and training, then two additional columns for entering text will appear. Now it's like I can choose only one of these two options and then a new table appears

    • SebastianSzyroki's avatar
      SebastianSzyroki
      Copper Contributor

      ganeshsanap 

      Świetnie, wydaje mi się, że to pomaga, ale niestety nie działa. mam 3 kategorie "Kategoria" ,,Liczba Pomaranczowa", "Liczba biała" w tabeli 'liczba pomaranczowa' formatowanie JSON wprowadziłem formułę =if([$Kategoria] == 'Sprzęt IT', 'true', 'false ') następnie po zaakceptowaniu pojawiła się następująca formuła (ekran)

       

      ale jak klikam w nowy formularz i wybieram sprzęt IT z kategorii to żadna dodatkowa tabela "liczba pomaranczowa" się nie rozwija

       

      • ganeshsanap's avatar
        ganeshsanap
        MVP

        SebastianSzyroki For which columns are you adding the formulas? 

         

        You have to apply formula on the fields which you want to show/hide conditionally and not on category drop down field. Also, make sure you are using correct internal names of columns in the formula.


        Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

Resources