# List presentation

## 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%2FErjsVfZ6NBXFBlWuscTq%2FList%20presentation.csv?alt=media&token=60a170bf-f649-4121-923b-6592a7b83a1b>" %}

## Add a data grid

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 presentation.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 Presentation.&#x20;
   2. In the Data Source, in the Table Variable, choose the table "Articles".
   3. In the Prompt, write "List of Articles".&#x20;
   4. In the Item Text, write "{Name}".
   5. In the Image Source, write "Cost: {Cost}SEK".
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%2FdO4a0hYglzy7OZRITw8n%2FList%20presentation.png?alt=media&#x26;token=0fb1de7d-131a-44b8-ab72-1eca3ef83d24" alt=""><figcaption><p>The list shows all articles, with name and cost</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. In Group Rows By, choose Category.
   2. In Item Style,  write the following code:

```
{case        
    when Category = 'Box' then '#65FFFF'        
    when Category = 'Pen' then RGB(204,204,255)        
    when Category = 'Paper' then 'GREEN'        
    when Category = 'Larger items' then '#EEA7F6'        
    else '' 
end}
```

3. 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%2FofsS5Tijd4bavuELtoVA%2FList%20presentation2.png?alt=media&#x26;token=34059752-a6ef-4600-9bec-9a95fcc450b4" alt=""><figcaption><p>The articles are now ordered by category and given a specific color. </p></figcaption></figure>

2. 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>
