I'm trying to configure a constituent import and translate Interest Groups into constituent attributes. The problem is that "Field DH - Interest Names" (Luminate Online Constituents data source) lists the interest groups the constituent belongs to as comma separated.
I tried using Regular Expression #21 from this list (https://iom.uservoice.com/knowledgebase/articles/291286-what-are-some-commonly-used-regular-expressions) however, it only works if ONE group comes in the connector, not two or more.
Is there an expression I can use/add to to that dictionary to only look at one groups out of a comma separated list?
Am I correct in my understanding that you only want to add the attribute if one particular group is present in the list?
Yes. I was going to add a virtual field seeding from DH for each attribute so that each would be updated at the same time (should there be more than one in the list).
Assuming the group is named Group1, and the attribute is named Attribute1
First line of dictionary: value to match .*Group1.* replacement value Attribute1
Second line of dictionary value to match on ^((?!Attribute1).)*$ replacement value -BLANK-
That is the expression I used, which is #21 on the expression list I linked in the URL above.
The issue I am having is that if two or more items are listed in the field "Group1, Group2, Group4" it displays BLANK when I tested it using the test button. That expression only works if one group is listed in the field from Luminate, unless I am doing something wrong.
You need the first line in the dictionary as well.
I have both lines in the dictionary, but it still only translates to "Yes" when there is only the group name in the field from luminate.
Both lines from my dictionary are attached.
Is this expression capable of picking out text out of a list, or is it designed to only activate with single values only?
If you change the value to match on in the first line of the dictionary to .*E Solicit Opt Out.* and turn on regular expressions it will pick E Solicit Opt Out from a list, otherwise it only looks at a single value. The -BLANK- entry looks a little funky too. I'm not sure if that will mess things up, but you may want to recreate the dictionary just to be on the safe side.
SUCCESS! I think I got it working. I'll need to test a little with some virtual fields to see if I can get it to work for multiple groups>attributes at the same time.