Hello, dear EDT experts!
I am now actively studying EDT, I like a lot, but there are questions that I cannot solve. Next, I will give one of the questions. I need to separate Number and Email from one column (Data) into separate columns. I’ve done a number of transformations, probably not in the best way, and if someone optimizes the process, I’d appreciate it.
I still have an unresolved question - in the Number field, if the number is 8 digits long, then 682 should be added before it. If the length is more or less than 8 digits, then you do not need to add anything.
The final table should look like this.
NumberEmailres.transform (6.0 KB)
I will be very grateful if you can suggest a solution.
To prepend “682” to any string 8 characters long, use a Calculate transform to calculate text Length and then use an If transform to prepend.
New .transform attached.
NumberEmailres2.transform (6.1 KB)
Here is the transform you are looking for.
NumberEmailres.transform (3.7 KB)
Better use this transform, as it is safe and was my first solution, but wanted to try out the Replace Transform and it does work, but it has a flaw and let see if you or others can catch it.
NumberEmailres2.transform (3.7 KB)
Happy New Year!
Thank you very much for a very quick answer, which helped me a lot in solving the issue.
I will use it!
Happy New Year!
I want to thank you for your practical help. It helped me a lot, though I made a mistake in my example. I am interested in having Email Number in separate columns, so I have supplemented your solution a little.
Both of your options are working, but so far, unfortunately, I don’t have enough knowledge of EDT to find any flaw. I’ll try it on large tables and maybe then I’ll see something.
Thank you very much again!
Here is simpler version, I made number and email separate initially, but your final result was all in one column so I created the solution accordingly, but if you want number and email separate then here it is
NumberEmailres3.transform (3.7 KB)
Thank you very much for sending an improved solution. Everything works perfectly!