Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Progress 4gl format string with constants

Is there a way to format a string in Progress with a specific character?

An example is showing an SSN with x's for the first 6 numbers. I've attempted to use the String function, but it does not respect the letter x being sent in with the format.

SSNString = '333224444'.
SSNString = String(SSNString, "xxx-xx-9999").
//This displays 333-22-4444 instead of xxx-xx-4444.
like image 924
Stacked Avatar asked Dec 07 '25 21:12

Stacked


1 Answers

I don't know a way to change this format with String function.

If you want to keep only the last four digits, you can try something like this:

SSNString = '333224444'.
SSNString = "xxx-xx-" + SUBSTRING(SSNString, 6, 4).
like image 171
doydoy44 Avatar answered Dec 10 '25 00:12

doydoy44



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!