# Issue with Multi select Button workflow, help!

**URL:** <https://community.weweb.io/t/issue-with-multi-select-button-workflow-help/8088>\
**Category:** Ask us anything\
**Created:** [April 12, 2024, 10:48am UTC](https://community.weweb.io/t/issue-with-multi-select-button-workflow-help/8088 "2024-04-12T10:48:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davy](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@Davy](https://community.weweb.io/u/Davy)\
**Post date:** [April 12, 2024, 10:48am UTC](https://community.weweb.io/t/issue-with-multi-select-button-workflow-help/8088/1 "2024-04-12T10:48:34Z")

</div>

Hi there,  
I am trying to create a popup with multiselect tags, I am having troubles setting up the variable what would be the best approach to set up the workflow and have an array with the value selected/no selected?

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/2/2e9296fc74368a4c2055fad767cb866535b28550.jpeg)  
 ![Screenshot 2024-04-12 at 12.44.04](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/6636e7f43b10bac1ad263d21a05b7d6c68225aa4.png)  
 ![Screenshot 2024-04-12 at 12.44.04](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/6/6636e7f43b10bac1ad263d21a05b7d6c68225aa4.png)

I have tried to use the dropdown component as well as an alternative even though I don’t really like the look of it, but seems like it doesn’t accept my data I have multiple outputs from my xano api endpoint:  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/9a16ed17f6b8ca3424cf462116a96cddfd33b695.png)

Could you help? Thank you so much @Alexis would you have an idea about the flow?

---

<div class="post-metadata">

**Author:** ![Alexis](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/alexis/32/13248_2.png) [@Alexis](https://community.weweb.io/u/Alexis)\
**Post date:** [April 12, 2024, 2:50pm UTC](https://community.weweb.io/t/issue-with-multi-select-button-workflow-help/8088/2 "2024-04-12T14:50:42Z")

</div>

1. Create an array containing the selected value
2. On click execute a workflow  
a. if the value is already inside then remove it  
 ![Capture d’écran 2024-04-12 à 16.49.32](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/4/4e4087a292dd65687e21dc452e549e70637ddda0.png)  
b. if the value is not there add it
3. For each tags apply a different color if the value is present in the variable

---

<div class="post-metadata">

**Author:** ![Davy](https://avatars.discourse-cdn.com/v4/letter/d/e495f1/32.png) [@Davy](https://community.weweb.io/u/Davy)\
**Post date:** [April 12, 2024, 9:14pm UTC](https://community.weweb.io/t/issue-with-multi-select-button-workflow-help/8088/3 "2024-04-12T21:14:35Z")

</div>

Thank you it did work, I didn’t get the findIndex right!
