Question4Replies5323Views×Close popoverSrinivas Yelamanchili (yelas1) PEGA Senior System Architect Pegasystems Inc. US View Profile yelas1 Member since 2014 76 posts PEGA Posted: September 12, 2016Last activity: September 28, 2016Posted: 12 Sep 2016 11:06 EDTLast activity: 28 Sep 2016 12:25 EDT Closed Solved Left or Right pad a stringI couldn't find a built-in function to left/right pad a string with a given character. Is there one available?For example I want to left pad with zeros for string 'xyz' so that the total length is 5.Output should be '00xyz'Thanks,-Sri Low-Code App Development Dev/Designer Studio Data Integration Java and Activities ×Close popoverFacebookTwitterLinkedinEmail Copy Link Copied! Moderation Team has archived post This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question. Posted: 4 years agoPosted: 12 Sep 2016 15:25 EDT×Close popoverNicholas Morgano (NickMorgano) Accenture CLSA Accenture US View ProfileNickMorgano Accenture replied to yelas1You need to use a Map Structured rule.This rule type allows you to define a length and whether you want to left or right pad to reach that length. You can also specify what character to pad with Posted: 4 years agoPosted: 13 Sep 2016 5:27 EDT×Close popoverDharanitharan Ravindran (DharanitharanR) Areteans Technologies LSA, DC, CS, BA & UI Specialist Areteans Technologies AU View ProfileDharanitharanR Areteans Technologies replied to yelas1In text control at read only text settings, there will a option to prepend/append, else do a edit input on property Accepted Solution Posted: 4 years agoPosted: 13 Sep 2016 8:00 EDT×Close popoverKrishnaPrakash Chandrasekaran (Krishnaprakash) CGI Netherlands Software Architect CGI Netherlands NL View ProfileKrishnaprakash CGI Netherlands replied to yelas1Logic will differ based on the requirement. Below code will solve your example, Assign a string parameter Param.DefaultPad="00000" Now Assign another string parameter Param.Outcome=Param.DefaultPad+"YourProperty" Now use length and substring function to get the last 5 characters from Param.Outcome. For example if your property contains "xy" then outcome will be "000xy". You can create your own function to accomplish this or can use activity to acheive it. Posted: 4 years agoPosted: 28 Sep 2016 12:18 EDT×Close popoverSrinivas Yelamanchili (yelas1) PEGA Senior System Architect Pegasystems Inc. US View Profileyelas1 PEGA replied to yelas1Thanks guys, all are useful suggestions. Sounds like we don't have a built-in string utility function, would be nice to have in future releases.