cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a simble between a number of letters with Calculation

LorenzoCapoccia
Level 4
Hi Folks,

I would like your help to do the following please... and thank you in advance for your help and time

Basically, I have data item 5655abc, and with the calculation stage I am trying to have the dash level sign (-) added
to provide the following result 5655-abc, but I am having problem... can you please help?

Thank you once again

1 BEST ANSWER

Helpful Answers

KaranSareen
Staff
Staff
Hello Lorenzo

You should be able to get the output by using the steps in the attached image:

36710.png


I hope you'll find this helpful. Let me know if you have any doubts

View answer in original post

3 REPLIES 3

KaranSareen
Staff
Staff
Hello Lorenzo

You should be able to get the output by using the steps in the attached image:

36710.png


I hope you'll find this helpful. Let me know if you have any doubts

Pranitha_Durgam
Level 3

Hello,

The below solution may help you by storing the data in a data item called "Data", and if the data is changing but with same number of digits and alphabets.

use calculation stage and perform this:
Left([Data], 4) & "-" & Right([Data], 3)

Pranitha_Durgam
Level 3

Hello,

I have come up with another approach where it can be used when number of digits and alphabets are not known.

So, in this approach I am using ToNumeric() function to convert each character of the word into numeric, it works if that character is digit but fails when it is an alphabet.

When it is a digit, I am appending that character to the data item "digits"

When it is character, it moves to the recovery mode where I append that character to the data item "alphabets" and resume it to continue to process next character.

after all characters are processed, on performing:

[digits] & "-" & [alphabets] in a calculation stage, it will give the desired output

Pranitha_Durgam_7-1742380887920.png

Pranitha_Durgam_8-1742380905854.png 

Pranitha_Durgam_9-1742380939240.png 

Pranitha_Durgam_10-1742380975386.png 

Pranitha_Durgam_12-1742381010688.png

Pranitha_Durgam_16-1742381103093.png

 

Pranitha_Durgam_14-1742381048698.png 

Pranitha_Durgam_17-1742381124830.png