Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Suggested Answer
+2
person also asked this
people also asked this
Replies
9 replies
Answers
1 answer
Subscribers
9 subscribers
Views
13324 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
Text Functions
ovidiubalan
over 7 years ago
Hello
I need to split a big text(200 characters let's say) so that at each 4th character I want to insert a new line.
The purpose is to display this big text in a paging grid.
Any ideas ?
Thanks in advance !
Ovidiu
OriginalPostID-251160
Discussion posts and replies are publicly visible
Parents
0
Thenmozhi Mohanakrishnan
Certified Senior Developer
over 6 years ago
load(
local!len: len(
ri!word
),
local!index: enumerate(
local!len
) + 1,
local!indices: a!forEach(
items: local!index,
expression: {
if(
fv!item = 1,
0 + 1,
if(
len(
tostring(
fv!item / ri!count
)
) = 1,
fv!index + 1,
{}
)
)
}
),
local!result: joinarray(
a!forEach(
items: local!indices,
expression: mid(
ri!word,
fv!item,
ri!count
)
),
char(
10
)
),
local!result
)
ri!word = Your long text
ri!count = How many character you want to split them into
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Thenmozhi Mohanakrishnan
Certified Senior Developer
over 6 years ago
load(
local!len: len(
ri!word
),
local!index: enumerate(
local!len
) + 1,
local!indices: a!forEach(
items: local!index,
expression: {
if(
fv!item = 1,
0 + 1,
if(
len(
tostring(
fv!item / ri!count
)
) = 1,
fv!index + 1,
{}
)
)
}
),
local!result: joinarray(
a!forEach(
items: local!indices,
expression: mid(
ri!word,
fv!item,
ri!count
)
),
char(
10
)
),
local!result
)
ri!word = Your long text
ri!count = How many character you want to split them into
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data