# Switch component text to be change

**URL:** <https://community.glideapps.com/t/switch-component-text-to-be-change/31742>\
**Category:** Ask for Help\
**Created:** [September 13, 2021, 8:34pm UTC](https://community.glideapps.com/t/switch-component-text-to-be-change/31742 "2021-09-13T20:34:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [September 13, 2021, 8:34pm UTC](https://community.glideapps.com/t/switch-component-text-to-be-change/31742/1 "2021-09-13T20:34:32Z")

</div>

Hi I have orders table which have the status column displaying new order in status field.now I turn on the switch component it sets to true in the place of new order.and I again turn off the switch component it sets to false in the place of true. working what I want.  
But I want true to be change as delivered and false as returned.how do I change.

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [September 13, 2021, 8:59pm UTC](https://community.glideapps.com/t/switch-component-text-to-be-change/31742/2 "2021-09-13T20:59:39Z")

</div>

Create an IF column.  
If the status is true, then return “Delivered”  
else if false, then return “Returned”  
else, return “New Order” or the status column value

Then you can use that IF column as the title for your switch component.

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [September 14, 2021, 9:47am UTC](https://community.glideapps.com/t/switch-component-text-to-be-change/31742/3 "2021-09-14T09:47:41Z")

</div>

I have a problem here,I already having a if statement like this.how can I create a if for the above problem.

 ![IMG_20210914_151704](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/5/5/55db6ee036b81e78881a3c3140c52bba86ec19fb.jpeg)

Iam adding row in orders table with column status to new order.later in the orders app I’m using switch component to on turns it to true but instead of true I need delivered and for false as returned.

---

<div class="post-metadata">

**Author:** ![Manikandan\_R](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/manikandan_r/32/43482_2.png) [@Manikandan\_R](https://community.glideapps.com/u/Manikandan_R)\
**Post date:** [September 14, 2021, 10:16am UTC](https://community.glideapps.com/t/switch-component-text-to-be-change/31742/4 "2021-09-14T10:16:56Z")

</div>

![IMG_20210914_154431](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/6/c657930e6e7510be629073d947f794b15f561dd1.jpeg)  
 ![IMG_20210914_154423](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/8/984ce09294cc97113e8763420aae3202124c28e2.jpeg)  
Have created like this in orders table. please check whether this is correct or not.I couldn’t display the detailed screen.for the list now.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 14, 2021, 11:20am UTC](https://community.glideapps.com/t/switch-component-text-to-be-change/31742/5 "2021-09-14T11:20:23Z")

</div>

If I understand the situation right, for displaying purposes you can just create a new If Then Else column as Jeff said.

If status is “New order” then “New order”.  
If status is “false” then “Returned”.  
If status is “true” then “Delivered”.

However, just for keeping the data in a good shape, I would restructure the flow to use “Returned” and “Delivered” directly instead of true and false. Just my personal preference.
