Start a new topic

Sequence of Digits Conversion Dictionary

Hi there,

 

Is anyone able to walk me through how to create a dictionary for the following scenario:

 

Virtual Field of Subtype is a copy field from Appeal, adding a dictionary that will map the first four digits of the appeal to a replacement value of the subtype. 

For example: INET-WALK-YY appeal should translate to INET-00-CASH subtype; INET-GALA-YY appeal to the same INET-00-CASH subtype. We have so many appeals that have different strings in the second four digits, I just want the software to pull the first four to map to the corresponding subtype. All INET appeals would have the same subtype; all DRPS appeals would have a DRPS subtype and so on.

Is this possible?

 

Thank you!


I can't test this right now but it seems straight forward.

Value to Replace: ^INET.*
Replacement Value: INET-00-CASH

Check off "Use Regular Expressions"
Thank you Wayne. I can test this successfully within the dictionary but when testing and/or importing within the IOM module it does not come across. my origin file has the exact same code i am testing in the dictionary, so i'm not sure where the disconnect is. I am using a virtual field/copy from and then using the dictionary. perhaps this is where the hiccup is originating?

Thank you for your help. I am also looking for a "not one of" type expression where there is one field I want to exclude from a replacement value. Is there a way to do this?
So you are applying both a function (Copy From) and the dictionary to the field?

Is the Copy working? Is INET-WALK-YY coming through at least?

Dictionaries do happen after functions so that should work.

Another thing to try might be to apply the dictionary to the original field (that you are copying from) to see if it work there.
Yes, the copy field is working fine. It also works fine when I use a manual dictionary (i.e. doing each appeal separately as a value to replace on). I do need to keep the original field for appeal intact for the mapping, and then add a column for the subtype (where I am using the copy currently).
hmm, try removing the ^ at the beginning. That makes it start at the beginning of the word, maybe there is a space or something.
Hi guys, thanks for your quick replies! I think Wayne your suggestion helped. Even though no space was detected in excel, somehow it wasn't mapping correctly. Problem solved with that expression though!

Thank you!
Login or Signup to post a comment