Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
9 replies
Subscribers
7 subscribers
Views
6335 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
Adding spaces between words in a Section Header
raghunandanj3904
Certified Senior Developer
over 8 years ago
Is there a way where we can add blank spaces between a string to show in a section header. For example:
"Name: Chris Age: 38 Gender:M".
If we try using concat or & the blank spaces are ignored and the resulting string would look like
"Name: Chris Age: 38 Gender: M". In the string there are few pv! variables as well so we are anyway using concat function.
OriginalPostID-243075
Discussion posts and replies are publicly visible
0
kondetiv
over 8 years ago
Try this way, concat("Name: Chris"," ","Age: 38"," ","Gender:M"). or
concat("Name:"&ri!name," ","Age:"&ri!age," ","Gender:"&ri!gender). It should work.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
mayurm896
over 8 years ago
load
(
local!firstName:"James",
local!lastName:"Bond",
local!fullName1:concat("First Name:",local!firstName," ","Last Name:",local!lastName),
local!fullName2:"First Name:"&local!firstName&" "&"First Name:"&local!lastName,
local!fullName3:"First Name:"&padright(local!firstName,10)&"Last Name:"&local!lastName,
local!fullName3
)
Check all 3 variants to get output !
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Shashank
over 8 years ago
@raghunandanc ,
Hi ,
As per my understanding , you are trying to concat three pv's lets say name , age and gender and want some space between them
in case you are trying to acheive that you can please use the following
"Name:"&pv!name&char(9)&"Age"&pv!age&char(9) and so on...
In the above char(9) is the way of representing a tab space in a string in appian , as 9 is the ascii value of horizontal tab
Hope this helpful
Thanks
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
Adding to the last comment, there is a larger list of so-called white space characters in the UTF8 tables which can be created using the char() function. See
www.cs.tut.fi/.../spaces.html
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
charanrajkrishnap0001
A Score Level 1
over 8 years ago
Adding to the above comments, there is a substitute() function where you can replace white space with wider one.
You may use something like below:
substitute(concat("Name:"&ri!name&char(9)&"Age:"&ri!age&char(9)&"Gender:"&ri!gender)," "," ")
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
abhinavg712
Certified Lead Developer
over 8 years ago
As suggested by Stefanh, i tied to use the same approach and was able to replicate the result as required.
SectionTest.txt
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
raghunandanj3904
Certified Senior Developer
over 8 years ago
Abhi, yes got it worked the Stefan way... @charanrajkrishnap, char(9) is not working to accept the tab space in SAIL code.. tried it as well.. Thanks all..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 8 years ago
You are welcome. Check this website for a huge list of all kinds of symbols. This sometimes helps a lot. Pick the number "HTML Entity (decimal)" for char().
www.fileformat.info/.../index.htm
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
raghunandanj3904
Certified Senior Developer
over 8 years ago
Thanks Stefan..
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel