I know my subject does not make sense. I want to trunicate a field that is 50 characters to 20 chars. I do not want to split a word. I want to check at the 20 chars.
There will always be data.
//this removes the comma if there is one in 19th or 20th char
if mid({cr_x.HDR},18,2) = ", " then
hdr_len :=left({cr_x.HDR},18) &&local variable set
IF Length(trim({cr_x.HDR})) > 20 then && have 20+ chars
I what to know how to check if the next char is a "A-Z" so I can -1 from the 20 until a space is found and I can extract from there and not split a word.
If someone knows how to check if there was a whole word, that would be wonderful.
Also is there a way to do a loop to check each letter as the code -1 until a space occurs?
Thank you in advance.
There will always be data.
//this removes the comma if there is one in 19th or 20th char
if mid({cr_x.HDR},18,2) = ", " then
hdr_len :=left({cr_x.HDR},18) &&local variable set
IF Length(trim({cr_x.HDR})) > 20 then && have 20+ chars
I what to know how to check if the next char is a "A-Z" so I can -1 from the 20 until a space is found and I can extract from there and not split a word.
If someone knows how to check if there was a whole word, that would be wonderful.
Also is there a way to do a loop to check each letter as the code -1 until a space occurs?
Thank you in advance.