Replaces all occurrences of a specified string with another specified string. The replaced string can be all or part of the data for one column. All parameters are case-sensitive.
Input Parameter Sequence |
Description |
---|---|
1 |
Source column containing the string to replace. |
2 |
String to replace. |
3 |
Replacement string. |
Output Parameter Sequence |
Description |
---|---|
1 |
Microsoft Dynamics CRM field in which to put the replacement value. This value includes the complete data for the column with the search string replaced by the input string. |
Sample Data Map Using Replace
This sample shows replacing "Washington" in the source "State" column with "WA", and putting the result in the target address1_stateorprovince attribute.
<Map Name="sample_contact_replace">
<Description>Sample map showing Replace Transformation</Description>
<EntityMaps>
<EntityMap TargetEntityName="contact" SourceEntityName="Source_contact">
<AttributeMaps>
<AttributeMap>
<SourceAttributeName>Source_lastname</SourceAttributeName>
<TargetAttributeName>lastname</TargetAttributeName>
<ProcessCode>Process</ProcessCode>
<AttributeMap>
</AttributeMaps>
<TransformationMaps>
<TransformationMap<specialCharacter name="greater_than"/>
<TransformationTypeName>Microsoft.Crm.Transformations.Replace</TransformationTypeName>
<ProcessCode>Process<ProcessCode>
<InputParameterMaps>
<SingletonInputParameterMaps>
<SingletonInputParameterMap>
<ParameterSequence>1</ParameterSequence>
<DataTypeCode>Reference</DataTypeCode>
<Data>state</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>2</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>Washington</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>3</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>WA</Data>
</SingletonInputParameterMap>
</SingletonInputParameterMaps>
<ArrayInputParameterMaps/>
</InputParameterMaps>
<OutputParameterMaps>
<OutputParameterMap>
<ParameterSequence>1</ParameterSequence>
<Data>address1_stateorprovince</Data>
</OutputParameterMap>
</OutputParameterMaps>
</TransformationMap>
</TransformationMaps>
</EntityMap>
</EntityMaps>
</Map>