Question 4 Replies 5554 Views × Close popover Srinivas Yelamanchili (yelas1) PEGA Senior System Architect Pegasystems Inc. US View Profile Send Message yelas1 Member since 2014 76 posts PEGA Posted: September 12, 2016 Last activity: September 28, 2016 Posted: 12 Sep 2016 11:06 EDT Last activity: 28 Sep 2016 12:25 EDT Closed Solved Left or Right pad a string I 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 Enterprise Application Development Dev/Designer Studio Data Integration Java and Activities × Close popover Facebook Twitter Linkedin Email Copy Link Copied! Moderation Team has archived post, learn more × Close popover 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 ago Posted: 12 Sep 2016 15:25 EDT × Close popover Nicholas Morgano (NickMorgano) Accenture CLSA Accenture US View Profile Send Message NickMorgano Accenture replied to yelas1 You 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 ago Posted: 13 Sep 2016 5:27 EDT × Close popover Dharanitharan Ravindran (DharanitharanR) Areteans Technologies LSA, DC, CS, BA & UI Specialist Areteans Technologies AU View Profile Send Message DharanitharanR Areteans Technologies replied to yelas1 In 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 ago Posted: 13 Sep 2016 8:00 EDT × Close popover KrishnaPrakash Chandrasekaran (Krishnaprakash) CGI Netherlands Software Architect CGI Netherlands NL View Profile Send Message Krishnaprakash CGI Netherlands replied to yelas1 Logic 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 ago Posted: 28 Sep 2016 12:18 EDT × Close popover Srinivas Yelamanchili (yelas1) PEGA Senior System Architect Pegasystems Inc. US View Profile Send Message yelas1 PEGA replied to yelas1 Thanks 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.