Extract lines from multi-line text

expressions
(Tony Fader) #1

This app shows how to extract lines from multi-line text using the SPLIT and INDEX functions.

https://www.appsheet.com/samples/split-text?appGuidString=49ade14f-f099-4a2d-9b78-3b5e4f43fbfe

5 Likes
(Levent Kulacoglu) #2

Hi @tony,
Is it possible for us to provide a preview of any sample app from our developer portfolio like you have shown in this topic post? If possible, what should be the correct syntax? Thnx.

(Grant Stead) #3

This is pretty cool…
Can you split based on any delimiter? Example by periods:
N69450.200.1.2.3

(Tony Fader) #4

@LeventK You can just plop down some HTML that has your app in an iframe. Like this:

<iframe src="https://www.appsheet.com/start/49ade14f-f099-4a2d-9b78-3b5e4f43fbfe?refresh=1&wipe=1" width="100%" height="568" frameborder="0"/>

I’m going to add this HTML to the Share App > Links in the editor, so you can paste your app into the community (similar how you can do youtube embeds).

2 Likes
(Levent Kulacoglu) #5

Yo’r da man @tony! Awesome!! Thought that HTML tagging might work, but not sure. Now it’s totally clear. Appreciate your input. Thnx bro.

(Tony Fader) #6

@Grant_Stead Yep, you can split on periods. More details here: https://help.appsheet.com/expressions/functions/split

(Fabian Weller) #7

@tony Can I do the reverse?
I have a List:
Apple , Banana , Canteloupe

And I want a Longtext with Newlines:
Apple
Banana
Canteloupe

I know this is possible with an expression like:

CONCATENATE(
INDEX([List],1) , "
" , INDEX([LIST],2) , "
" , INDEX([LIST],3)
)

But if you have a lift with 100 Fruits, this will be a looooong expression :wink:

(Steve Coile) #8

Use SUBSTITUTE():

SUBSTITUTE([list], " , ", "
")

Note the third argument is a double-quoted newline.

3 Likes
(Fabian Weller) #9

Thank you very much @Steve

1 Like