Skip to main content

Hello,

 

I have a table with some attributes and I created a new column which is called "Description" with the following string, by using the text editor in attribute manager :

"New values, Dat: @Value(Dat), Nat: @Value(Nat), OBJNAM: @Value(OBJNAM)"

 

However in some cases there are no values in all those attributes and the output looks like this:

 

"New values, Dat: , Nat: Underground heigh., OBJNAM: , "

 

I would like to exclude the attributes that don't have a value (in my example the Dat and ONJNAM), for each row.

I guess I should use somewhere a conditional formatting but I am not sure how and where to do that.

 

 

Yes, this can be solved with conditional values but it's a bit of a hassle since there's three attributes which can all be missing or not, so 6 options in total to work out.

 

Alternatively, you could use a StringReplacer with a regular expression, removing "Dat:," "Nat:," and "OBJNAM: ,"


Yes, this can be solved with conditional values but it's a bit of a hassle since there's three attributes which can all be missing or not, so 6 options in total to work out.

 

Alternatively, you could use a StringReplacer with a regular expression, removing "Dat:," "Nat:," and "OBJNAM: ,"

They are more than 3 attributes! I just use an example here.

Also not all the rows are missing the same attributes. I will try the string replacer.


They are more than 3 attributes! I just use an example here.

Also not all the rows are missing the same attributes. I will try the string replacer.

(Dat: ,|Nat: ,|OBJNAM: $)

Should do the trick as Regex (using your example). And just replace with an empty string


They are more than 3 attributes! I just use an example here.

Also not all the rows are missing the same attributes. I will try the string replacer.

Yes, it works! Thank you!


Reply