server side scripting : if null cannot just show nothing ' '

server side scripting : if null cannot just show nothing ' '

fc338339fc338339 Posts: 11Questions: 7Answers: 1

Field::inst( 'tablename.fieldname' )->setFormatter( 'Format::ifEmpty', '' ),

or

Field::inst( 'tablename.fieldname' )->setFormatter( 'Format::ifNull', '' ),

as result it still show 'null'

please help

Answers

  • colincolin Posts: 5,407Questions: 0Answers: 940

    Hi @fc338339 ,

    as result it still show 'null'

    Is this in the database, or the table on the client? Looking at the code, it should be setting the value in the database to be an empty string. One point, the manual here only has the fieldname, I'm not sure it needs to be prefixed by tablename. .

    Hope that helps,

    Cheers,

    Colin

Sign In or Register to comment.