How to display the text to newline

How to display the text to newline

  

Hi All,

I have a value Test1,Test2,Test3.

I want to display as

Test1

Test2

Test 3.

It is possible?

regards,bb

Hi Jace,

Assuming that your text is actually a comma-seperated list in a Text variable, you can use the String_Split Action from the Text module to make it into a List of Text. Next, you can use a List Records widget to display that list.

Hi Jace, 

Are your values coming from the database or static values?

If they are coming from database and if comma separated, Kilian sir's solution will work but if it is static, you can use NewLine() also after every value.

Hi Jace,


Like the previous posters it really depends what the source is and what you want to do with it.

Each persons assumes something based on your question, so if you can explain your problem more in detail we could give you a better solution.



Hi Jace,

I am agree with suraj, I also use NewLine() when I am getting the value from database.

I think your problem will resolve by this.

Regards

Rajat Agrawal

Hi Jace,

It is very much possible using NewLine() function.

If your text is a dynamic string you can loop thru and make a display it with splitting with coma and add NewLine() fucntion.

If it s astraing static text you can use is directly .

I am attaching a screenshot for you reference.


Despite seemingly everyone calling for a NewLine(), I would vote against it, and use a List Records instead. With NewLine() you don't have much control over how to display each element, while with a List Records, you can use CSS styling.

Following up on both Kilian's answers, List Records allows you to iterate through any List and display each of the List's elements separated by New Line if you so choose (this is the default, but you can also render the list as a Bulleted List, or without any explicit separation - in which case you could for instance use Containers or CSS to separate list elements to your liking), making it the most versatile solution... and String_Split will create a List from any string (that you can then use with a List Records)

The returning value from Database will be Test1,Test2,Test 3.

But i want to display it as 

Test 1

Test 2

Test 3

Saw i do not think NewLine() can work for me. Perhaps String_Split or the list record.

Regarding list record, how do we assign to the list record?

hi Jace,

simply you just assign its Source Record List to the String Split Output:

and do not forget to drag the entity/struct attribute to the Record List widget also.

regards,

bb

Barong Bali wrote:

hi Jace,

simply you just assign its Source Record List to the String Split Output:

and do not forget to drag the entity/struct attribute to the Record List widget also.

regards,

bb

Hi,

String_Split.List is text extension? Because i couldn't find it.


yes,

Hi Jace,

I would also suggest to go with Record List rather using String_Split, because remember in case if your data have a comma "," then, String_Split will break it too.


Shashank... 

Shashank Diwan wrote:

Hi Jace,

I would also suggest to go with Record List rather using String_Split, because remember in case if your data have a comma "," then, String_Split will break it too.


Shashank... 

Hi Jace,

I am agree with Shashank because if you are getting test1 value like Jace,Jace then it will split test1 value into two separate parts.


Regards,

Rajat Agrawal



Shashank, it's not a matter of Record List or String_Split... Jace needs to use String_Split to break the original string into several substrings (on the ',' character), and then use a Record List widget to display the resulting list as described by J., me and Barong. The two work together.

Hi Jorge,

Thanks for clarifying, you mean he is getting "Test1,Test2,Test 3" as one record which need to be broken down right?


Shashank...

Shashank Diwan wrote:

Hi Jorge,

Thanks for clarifying, you mean he is getting "Test1,Test2,Test 3" as one record which need to be broken down right?


Shashank...

Hello,

Sorry if my question is not clear, yes, the database is returning me with value Test1,Test2,Test3. But i want to display it as 

Test 1

Test 2

Test 3.


Solution

hi jacejace,

1. your table return 1 value

2. You want to display like this:


I attach .oml

regards,

bb

Solution

Barong Bali wrote:

hi jacejace,

1. your table return 1 value

2. You want to display like this:


I attach .oml

regards,

bb

Hi,

Thanks for the help, but i couldn't find the text extension function to download. Mind to share when can i download the text extension


It is built-in in the ManageDependency of Service Studio since version 10.0.603.0; if yours obsolete version, please update each time new release comes as there is refinement or bug fixing for each new one. Now it has been 10.0.707.0 version:

Steps:

1. open the manage dependency button (the plug-in button) on the menu bar.

2. Find text and tick the String_Split function

3. click ok

Then find in the Logic Tab whether that function has been gravitated into your espace:

regards,

bb


Hi Jace,

If you need some functions that was not available in Built-In Function in Expression Windows, chances are it may be already provided in the form of Extensions.

Just do manage dependency, and browse the available Extensions.

Me myself was amazed by the fact that I can do fancy things such as getting email from POP3 server, create zip file/compression, login/getuserinfo/etc from ActiveDirectory or LDAP without any Forge plugin.