# List multi-selection input

## Prerequisite data

No connectors will be used in this example, but data from table steps will be utilized. Please download the file below; it will be used to import into the required table steps

{% file src="<https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2FuWUThOZrWRWqtNT7ySQU%2FList%20selection.csv?alt=media&token=0c47befc-ff4d-497e-a585-5f57e174bdd7>" %}

## Add a list multi-selection input

1. Open an existing [application ](https://docs.novacura.com/flow-connect/working-with-connect/create-and-design/applications/create#create-application)or create a new one in an [application package](https://docs.novacura.com/flow-connect/working-with-connect/create-and-design/application-packages) and open it in the Designer.
   1. Add a User step.&#x20;
   2. Add a Table step.
   3. Open the Table step and select **Import File**.
   4. Choose the semicolon separator and click **OK**.
   5. Select the "List selection.csv" file downloaded in the prerequisite section above.
   6. Set the table variable name to "Articles" and click **OK**.
   7. Change the step name to "Articles". It's good practice to name steps after their content.
   8. Right-click on the "Articles" step, select **Add data arrow**, and connect it to the User step created in step 1.

<figure><img src="https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2F8vrpDnAHW4S4qnrzTqx7%2Flist%20seletion.png?alt=media&#x26;token=b3ac8b0e-af8f-4d59-9c3d-9b7b2b015216" alt=""><figcaption></figcaption></figure>

2. Open the User step.
   1. Add a List multi-selection input.&#x20;
   2. In the Target Variable, write "articles".
   3. Under Data Source, in Table Variable, choose the table "Articles".
   4. Set the Default Selection to "{Name = "Small box"}".
   5. Under Appearance, in Prompt, write "Choose an article".
   6. In Large Row Text, write "{Name}".
   7. In Small Row Text, write "{Cost}{" in SEK"}".
   8. Le the Group Rows By be none.
3. Click the **Play** button in the top right-hand corner to run the application in diagnostic mode.

<figure><img src="https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2FDjIbg4eD1KrKvV9UKvAa%2Fmulti-selection.png?alt=media&#x26;token=986b1ad3-b0aa-4495-add6-66ce86872679" alt=""><figcaption><p>Small box is chosen by default, but it's also possible to make multiple selections. </p></figcaption></figure>

## Add configuration

When working with tables, connect offers a variety of possibilities to add configuration and style to make it look more suiting for your purpose.

2. Go back to the Designer.

   1. Open the drop-down in Group Rows By and choose "Cost".
   2. Run the application in diagnostic mode again.

   <figure><img src="https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2Fx64o64HveDnc4lvyLI0i%2Fmulti-selection2.png?alt=media&#x26;token=cda0d2ba-961b-41f2-b9fe-9c4d6ea1552f" alt=""><figcaption><p>Instead of displaying the Articles in a list, they are now displayed in a drop down that opens a table. You can still see the Small Box is default selected.</p></figcaption></figure>

<figure><img src="https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2FJ9NEik1HZqdv2uO8dAdE%2Fmulti-selection3.png?alt=media&#x26;token=e42fbd0b-4c3a-40d1-9281-251cc6de9c67" alt=""><figcaption><p>The articles are displayed grouped by the Cost. The small box is selected but you can make multiple selections. </p></figcaption></figure>

2. You can also display this grouping with colors.
   1. Remove "Cost" from Group Rows By.
   2. In the Item Style, open the editor by clicking the arrows to the far right.&#x20;

<figure><img src="https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2F6VhUbn9eoNQz2BXOQ6WI%2Feditor.png?alt=media&#x26;token=869c4c3e-a15c-4ac0-80af-82aba6579114" alt=""><figcaption></figcaption></figure>

3. Add the code below.&#x20;

```
{case    
    when Cost = '5' then '#65FFFF'    
    when Cost = '20' then RGB(204,204,255)    
    when Cost = '30' then 'GREEN'    
    when Cost = '50' then '#EEA7F6'    
    when Cost = '75' then RGB(204,255,204)    
    when Cost = '100' then 'BLUE'    
    when Cost = '250' then '#FDC096'    
    else '' 
end}
```

4. Click the **Play** button in the top right-hand corner to run the application in diagnostic mode.

<figure><img src="https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2F65wDuMicZJAggKkyIjpC%2Fcolors.png?alt=media&#x26;token=a6f107ec-d043-48b0-b2d8-3b85ba28869a" alt=""><figcaption><p>The articles with the same cost show the same color. </p></figcaption></figure>

3. Condition to hide&#x20;
   1. In the Condition To Hide, write “{userId = “*your user id”*} *(the user Id you log in to Connect with)*
   2. Run the application in diagnostic mode again.

<figure><img src="https://1716064794-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIIgl6sNaTky0iALxYWHH%2Fuploads%2F30JbA6gLpdXaMHuSOvLR%2FWith%20border.png?alt=media&#x26;token=589bec14-8458-499f-ac8b-73b3da8387ab" alt=""><figcaption><p>The list is now hidden since the condition is fulfilled.</p></figcaption></figure>
