INCLUDE Function

6 posts / 0 new
Last post
mkeiffer33
Offline
Joined: 12/23/2015 - 17:54
INCLUDE Function

Hi there,
I have a background in ACL and in ACL, there is a function called the INCLUDE function that will include all occurrences of a specified character or characters from an existing character string.  As an example, INCLUDE(Address_Field_Name, "0123456789"), will give me all of the numeric characters from the address field, regardless of where they are located in the field or how many times they occur.
There does not appear to be an equivalent function for this in IDEA.  @spanincluding comes close but still does not work the same as the ACL INCLUDE function.  Is there a custom function for this, or I am just not finding the right function in IDEA?
Thanks in advance!
Mike

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

If you are just looking to extract numbers only you can use @justnumbers function.  There is the @remove function but it only allows you to do one character at a time, so you can nest multiple @remove together. There is also the option to use the @RegExp function that can do something like this.  Finally I could create a custom function, let me know.

mkeiffer33
Offline
Joined: 12/23/2015 - 17:54

Hi Brian,
Would it be possible for you to create a custom INCLUDE and EXCLUDE function where I could include and exclude all occurrences of a specific character and also to where I can do it with more than one character?  That would be great!  Here is the link to the ACL webpage for how their INCLUDE function works.  I would love to have something like this in IDEA.  
Here is the link -
https://help.highbond.com/helpdocs/analytics/141/scripting-guide/en-us/C...
Thanks so much!

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Michael, this is actually a great idea for a custom script.  Let me put something together and I will post it for you to test it out.

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi Michael, can you try these out and let me know.  I also added a third parameter to indicate if the matching is case sensitive or not.  0 is case sensitive and 1 is non-case sensitive.  

mkeiffer33
Offline
Joined: 12/23/2015 - 17:54

Hi Brian,
Thanks so much for developing these for me.  I will try it out and let you know.  Thanks again, this is awesome!