Buy Now
Sign in

Switch display value of 0 and 1

relliott , September 20 2017
r
relliott

Hello,

I have a simple database for storing statuses of a lead. In the database I have a fieldset of "active". The data is stored 0 for no and 1 for yes. How do I switch the datashown on my connection from 0 and 1's to No and Yes?

Thanks,

Ryan

admin

Hi Ryan,

This is in a table view ? if yes then you will need a "Switch" function called in the "Columns views".

Example:

				Model.field:{fn:myswitch}
				


Then in the "myswitch" function, set the "Data provider" to:
				{var:table_view_name.row.Model.field}
				

Values setup:


Best regards,
Max

Max
If your main question got answered then please mark the answer using the button!