[IGN-2200]Replace values displayed as "null" in the perspective table

Ignition 8.1.3
When we query audit table for example, NULL value are displayed as "null" in the perspective table

Is there an effective way to display empty value instead of null ?

If those columns are supposed to be numbers, a script transform like this to set the correct column types should work:


If they are strings, you could do a script transform that replaces the null with "".

I would like to avoid checking all dataset values :unamused: @PGriffith
IMO it will be better that None value in a dataset would be displayed as empty string in the table component ?

1 Like

How are you querying the audit table?

This is an option we’ve had a feature ticket for for a while. I kicked it up in prioritization.

4 Likes

Removing the column name from columns.[X].field property worked for me. Doing this, it shows blank for null.

Any update on this? I still see null in 8.1.11. (Also, I don’t think the removing columns.[X].field is the right solution, as it breaks everything else I’m doing with columns.)

2 Likes

We too would use this feature. We have noticed that the word ‘null’ is a bit distracting and causes clutter on particularly large tables. Granted, another solution would be to shrink the table…

I had luck changing the data return format to json and all null values from the database show blank instead of ‘null’.

3 Likes

I updated the columns.[x].render value from auto to number in my project and it removed the nulls. You may experiment with this for other data types.

Thanks, but in my use case, columns are string, and with auto or string i obtain “null” (Ignition 8.1.14)

1 Like

I had similar problem but I managed to remove the nulls from the display. In case of integer columns (if associated with a table), it defaults to blank but in case of other data types, I explicitly used NVL() function in the SQL query itself to determine whether bounded column value is NULL or not and then, if NULL, replaced it will a blank space and it seems to work fine for me. The situation may not be the same for everyone but incase if it is associated with a table, the SQL query can be modified to present the formatted data to be displayed in the table.

I would just edit the SQL to use a COALESCE function with each value that could be a null. This allows you to replace a null value with whatever you want.

Been waiting for this feature for a long time, where the table column can be configured to not display anything if the value is null.

Obviously there are ways around this and I've used them all.

  1. Put an ISNULL() in the SQL Query and return empty string - But I use this SQL query to pull data that might then get written back to the database. now I'll have to replace all empty strings with nulls.

  2. Use python script to iterate through returned dataset and replace nulls with empty string. Trouble is with a large dataset, this becomes really slow.

Would really like to see this feature in the table component soon!

1 Like

You missed:

  1. Bind the query to a custom property for use with edits, and use a transform from that on the table to replace the nulls with empty strings.

I bumped the internal ticket a bit in priority, but it's sitting in a large pile of work, so no timeline on implementation.

2 Likes

I see your back working on your next award!

FYI, this is being implemented now and should be available very soon.

2 Likes

Thanks! Will update address this buggy behavior, or something else?

When render is set to "auto", the table uses the contents of the first row to determine the type (performance reasons). The exception is when it is being fed a dataset, since it can derive the column types from the dataset object. Potentially we could do the first few rows, but then we eventually run into the same problem.

With the work we've done, you'll be able to specify how you want null values to display, and whether you also want to include "null" strings (case independent). You can define this globally, and also override it at the column level.

3 Likes