Why strip newline characters from Text Static but not Dynamic Entities?
Platform Version
11.15.0 (Build 33590)

Can somebody explain to me, why newline (\n) characters are stripped from Text Attributes of a Static Entity but not in a Dynamic Entity? It's odd that the two are treated differently requiring us to work around this by explicitly writing and then replacing line separator characters (e.g. \n) in our Enum.

What's the rationale here because it leads to more complexity up top for no obvious reason?

Also, we cannot even find this behaviour explained in the documentation.


Edited: Clarified that \n is our workaround.

Hi WOlfgang,

How if we really need that '\n' character?

regards

Exactly my point, Indra. We should not be required to use such a workaround because OS decides to strip out all the newline characters.

But, as a workaround using newline (`\n`) to represent newline seems the most reasonable approach.

mvp_badge
MVP

Hi Wolfgang,

Though I don't know the rational behind removing newlines from Static Entity attributes, it's pretty obvious why there's a difference between Static Entities and normal Entities here: records of Static Entities are created design time, and it's Service Studio determining what is acceptable and what isn't. Records of normal Entities are created during run time, and store the data as it is supplied, there's no conversion going on there.

Hi, 

It could be performance reason as well? Below there is a link about static vs dynamic:

https://marcoarede.medium.com/outsystems-performance-and-robustness-entity-get-actions-vs-aggregates-a7ba3bfae669?p=c633fd81e760


regards

Thanks, @Kilian Hekhuis and @Indra Budiantho.

Indeed, the differences between static and dynamic entities are obvious in terms of storage, performance or use.

However, that does not warrant an IDE to strip out characters from a Text (well, string) in one and not in the other. A Text attribute should be a Text attribute no matter what.

That's just not what one would expect from a platform that aims to be enterprise/professional ready. SMH.

I agreed Sir, I think you can drop an idea to OS for this issue.

regards and thanks

mvp_badge
MVP

Oh, I agree, stripping out NewLines in static entity text is a bit weird.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.