I have a utag_data variable which could have +1000 unique values. For about 100-200 cases I need to replace the value with another value. I have a sql table which can be used to generate a csv of all the replacement cases for upload into the Lookup Table extension. My question is when there is no match, can the destination value be retained? If my destination variable is called 'name (js)' would I need to put something like b['name'] into the default output? I am using a string variable type and Match type exact.
Hope this helps.
Check out our new Swift integration library for iOS, macOS, tvOS and watchOS: https://github.com/Tealium/tealium-swift with updated documentation https://community.tealiumiq.com/t5/Swift/tkb-p/swift.
What you can do is use a couple of extensions as a workaround to this.
Add a set data value extension to run before the lookup table. This extension will always run and store the original value in a new var. So, if the var you're trying to preserve is named 'lookup_var', you'd have another var, titled something like 'original_var', equal to 'lookup_var'
Your default table runs next in sequence, and the default value (if there is no match) can be something like 'default'
Create another set data value extension to run after the lookup table that only runs if 'lookup_var' is equal to 'default'. If this condition is satisfied, set 'lookup_var' to 'original_var'.
Set data value extension, setting 'original_var' to 'lookup_var'
Lookup table extension setting 'lookup_var', with a default value of 'default' if no match is found.
Set data value extension runs if 'lookup_var' equals 'default. If so, sets 'lookup_var' to 'original_var'
Thanks Son, that worked. Could a check box be added to the Lookup Table extension UI to retain the original value if no match is found? Which could then skip the final line of code in the Lookup Table extension.
b['_myVal'] = 'Default Output';