# List 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="/files/4deMzQ91meLeuOaLdMGC" %}

## Add a list 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="/files/7YoEtYwSemXrNWwN8cp0" alt=""><figcaption></figcaption></figure>

2. Open the User step.
   1. Add a List selection input.&#x20;
   2. In the Target Variable, write "article".
   3. Under Data Source, in Table Variable, choose the table "Articles".
   4. Under Appearance, in Prompt, write "Choose an article".
   5. In Large Row Text, write "{Name}".
   6. In Small Row Text, write "{Cost}{" in SEK"}".
   7. 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="/files/9x5vBG09czqnUHpdU65h" alt=""><figcaption></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="/files/dqUJzvm6syiU8lncONp1" alt=""><figcaption><p>Instead of displaying the Articles in a list, they are now displayed in a drop down that opens a table.</p></figcaption></figure>

<figure><img src="/files/ryTaEz8qnQayeCIFeBia" alt=""><figcaption><p>The articles are displayed grouped by the Cost.</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="/files/b02FWVVxp8xtsggLLfD0" 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="/files/uIWXZJImWWY0WTxYMqSA" 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="/files/mppUkxzWDnuGCzC7vKo8" alt=""><figcaption><p>The list is now hidden since the condition is fulfilled.</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.novacura.com/flow-connect/reference/how-to-guides/create-user-step-controls/list-selection-input.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
