How to remove the New line / Line break Character
Looking for a solution to remove the line break or new line character from the text formatted line item editable by end users.
reading the text from the user editable line item to another line item, in the process want to replace new line character if any from the text. Because of New Line character the data while being exported and loaded into the target system resulting into loss of data.
Answers
-
Hmmm. I've seen this before. Did you try using the TRIM function?
https://help.anaplan.com/en/068058a3-7495-427b-bfb1-d8b9f8d0e62d-TRIM
You can't prevent users from entering the Line Feed but you can create another line item that will remove it.
1 -
Thanks! We had the same problem and TRIM worked!
0 -
True, TRIM function has removed the above challenge and eliminated data loss problem
0 -
hello,
I would like to create a conditional formating on a cell text with a break line. How can I do It?
0 -
Hi @mcoudeyras ,
Could you clarify your requirement? If you're trying to differentiate between entries with a line break/new line character and the original user-entered text, you can do so by comparing their lengths. Trimming the entries with line breaks will reduce their length, which you can use to assign some value. This value can then be utilized in the conditional formatting from the UX side.
0 -
Hi,
I would like to prohibit the use of break line in "free to fill" text cells. And in case of break line, create a conditional formatting via an alert
0 -
Hi @mcoudeyras ,
For that you may create different Line items for your different "Free to fill" text which will be used in conditional formatting or even you can make just one combining all those. The example is shown below,
In first Line item there's free to fill text,After then in Second line item there's formula as: TRIM(Text) which is for demonstration purpose you may skip this.
And then in the Final Line Item "Line Break CF" there formula checking the length of both asOr it can be simply made as,
I hope this helps.
0 -
Hi @mcoudeyras ,
We can't restrict user from using a line break within a text cell. However, there is a workaround to identify if a line break is used.
1. Create a lineitem of text format within your input module, without any dimensions, and enter text as shown below, just "A", then linebreak, and then "B"2. Add two calculation lineitems as shown below to identify linebreak and its numeric position
3. Apply conditional formatting on the original 'text input' lineitem using 'find new line pos'
It highlighted for APAC item, because I used linebreak in the text input cell:
You may have to verify the "sample input" cell and fill it manually in the deployed model, once you publish this change.
Hope this helps.
Cheers!0 -
👍️
Perfect, it works
Thanks a lot.
0