Forums

If/Then in PHP Functions

momentis 09 Feb, 2016
I have a field in a connection that contains a "1" or "0". How do I display, in my connection listing, a "Y" for the "1" and a "N" for the "0"?

I know - blatantly easy, but I can't get it to work.

šŸ˜¶
GreyHead 09 Feb, 2016
HI Momentis,

In the PHP Functions box of the listing try something like this
model_id.some_name:if ( $cell == '1' ) { return 'Y'; } else { return 'N'; };

Bob
momentis 10 Feb, 2016
Thanks, Bob!! I felt silly even asking that, but there you have it.šŸ™‚

Rick
This topic is locked and no more replies can be posted.