Page 1 of 1

Howto concat fields in Text expression

Posted: Thu Jun 30, 2022 1:47 pm
by florian
I'd like to concat several source fields into one Text.Text expression. The expression I use is

Code: Select all

{string.Join(" / ", new []{ source.Field1, source.Field2, ... }.Where(x => x != null)}
or simplified to reproduce:

Code: Select all

{string.Join(" / ", new []{"A", null}.Where(x => x != null)}
but get the error

Code: Select all

The error of compilation is found in the 'Text' property of the 'Text23' component: } expected
Is there any way to escape the sequence or archive the concatination?

Re: Howto concat fields in Text expression

Posted: Fri Jul 01, 2022 9:37 am
by Lech Kulikowski
Hello,

Unfortunately, it is not possible with standard functions.

You can implement and add to the Dictionary your own function for that task.

Thank you.

Re: Howto concat fields in Text expression

Posted: Fri Jul 01, 2022 2:05 pm
by florian
OK, thank you. I'll implement a custom function for this.

Re: Howto concat fields in Text expression

Posted: Mon Jul 04, 2022 7:08 am
by Max Shamanov
Hello,

You are welcome!