Switch component text to be change

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.

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.

1 Like

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

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.

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.

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.