Skip to main content

Open ideas have been reviewed by our Product Management and are open for commenting and voting.

Filter by idea status

Filter by product area

4588 Ideas

thijsknapen
Contributor
thijsknapenContributor

Change default value of AttributeValueMapper transformer from 'empty string' toArchived

***Note from Migration:*** Original Title was: Change default value of AttributeValueMapper transformer from 'empty string' to 'No action' A couple days ago I used the AttributeValueMapper transformer to map some values from a database column, to a new attribute value for use in an api. The thing is that only a couple of values had to be 'remapped' for the use in the api, while others could remain the same. In this usecase I was using the same Destination attribute as the source attribute.Unfortunately I was a bit too hasty, and after a while I discovered that some of my original values were remapped to an empty string. Personally I was expecting the default value to remain the same in case no mapping is specified for that specific source value, however by default attributes are mapped to an empty string, as an empty string is the default (of the 'default value' parameter). For my usecase, but also in general, I feel it would be more natural to use the default value 'no action' (for the 'default value' parameter). Also, when using 'no action' for the 'default value' parameter, the (~default) setting of mapping to a different destination attribute, would return a 'missing value' in case no mapping is specified for the source value (which I believe to be more appropriate than an empty string).

thijsknapen
Contributor
thijsknapenContributor

Add option to string function 'ReplaceRegEx(str, regExp, newStr, [caseSensitive]Archived

***Note from Migration:*** Original Title was: Add option to string function 'ReplaceRegEx(str, regExp, newStr, [caseSensitive])' on what value to return in case no matches are found (similar to the option in the equivalent stringreplacer transformer) I hope the title is self explanatory. Today I was using the string function 'ReplaceRegEx(str, regExp, newStr, [caseSensitive])', and found out that in case no match is found by the regExp, the 'newStr' is set to 'str'. To start, I think it would be nice if a description on the behaviour of this function in case no matches are found, could be added to the string function documentation.Depending on what you aim to achieve with the function, the default behaviour can be a bit confusing. For my case it would have been better to have the option to set the value to an empty string (as I was using the string function to replace the original string, with parts of the original string, using replacements based on 'capturing groups' of regex). However, I can also imagine that in most use cases the preferred default behaviour would indeed be to return the original string in case no match is found. In the equivalent stringreplacer transformer it is possible to specify a value in case the attribute value does not contain the text/regex, by using the option 'Set Attribute Value To'. It would be nice if this option can also be added to the string function (as an optional parameter?).