https://issues.qgis.org/https://issues.qgis.org/favicon.ico2012-09-04T10:08:38ZQGIS Issue TrackingQGIS Application - Bug report #5244: Expressions: tostring() does not work as expected when the argument is evaluated to NULLhttps://issues.qgis.org/issues/5244?journal_id=349182012-09-04T10:08:38ZPaolo Cavallinicavallini@faunalia.it
<ul><li><strong>Target version</strong> set to <i>Version 2.0.0</i></li></ul> QGIS Application - Bug report #5244: Expressions: tostring() does not work as expected when the argument is evaluated to NULLhttps://issues.qgis.org/issues/5244?journal_id=434362013-07-21T15:11:21ZNathan Woodrow
<ul></ul><p>I don't like the idea of treating NULL as an empty string. Empty strings are still valid data where as NULL is nothing. NULL might mean N/A for my data vs '' having some meaning. Treating them the same could have bad side effects for people trying to label, style, their data.</p>
<p>You no longer need to use CASE and can use <code>coalesce(COLA, '')</code>. You can also use the new <code>format</code> function which will auto convert to strings</p>
<code>format('%1 %2', coalesce(COLA, ''), coalesce(COLB, '')) </code> QGIS Application - Bug report #5244: Expressions: tostring() does not work as expected when the argument is evaluated to NULLhttps://issues.qgis.org/issues/5244?journal_id=434372013-07-21T15:11:31ZNathan Woodrow
<ul><li><strong>Resolution</strong> set to <i>fixed</i></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul>