Liquid Studio Documentation
Data Mapping / Data Mapper Functions / By Category / String / Lower
In This Topic
    Lower
    In This Topic

    Function Name
    Lower
    Category
    String
    Icon
    Lower
    Description
    Convert text string characters to lower case
    Inputs
    String Text String to convert to lower case
    Outputs
    Result Text String with all characters converted to lower case
    Properties
    Culture Set culture for language data

    Usage

    The Data Mapper String Lower function converts text String characters to lower case. If your source XML contains characters you wish to be stored entirely in lower case within the target, you can apply this transform when mapping the data. Whether the characters are within element content or within attribute values, the transform will execute on them. To apply the String Lower transform function, use the following process:

    Create a new Data Mapper file, dragging your XML data source and targets into the editor area. For this example we are using comment_source.xsd, an XML Schema Definition inferred from the following source:

    Source XML
    Copy Code
    <comment contributor="Mary">
     I really like this
    </comment>
    

    For our target schema we will be using comment_target.xsd, inferred from the following XML:

    Target XML
    Copy Code
    <user_comment>
     <user>john</user>
     <content>I absolutely love this</content>
    </user_comment> 
    

    The data models user comments for a product or website. Here is the Data Mapper with Source and Target imported:

    Data Mapper String Lower Function

    Let's drag the String Lower function from the Component Palette into the mapping area:

    String Lower Component

    String Lower Transform Added

    The String Lower function takes a single input and gives a single output. The input should be connected to the source text String item to be converted to lower case. The output should be connected to the target item. In this case we are mapping from an attribute to an element:

    String Lower Transform Mapped

    We map the "contributor" attribute in the XML Reader to the "user" element in the XML Writer, converting to lower case at the same time. Finally let's make the remaining input and output connections:

    Input and Output Connections Mapped

    We can now execute the transform by pressing Shift-F5 or the Execute button (Execute). The transform is applied and the file we selected as output opens in the editor:

    Output XML
    Copy Code
    <user_comment>
     <user>mary</user>
     <content>
      I really like this
     </content>
    </user_comment>
    

    The input attribute value has been converted to lower case as part of the mapping process.

    Properties

    If you happen to be dealing with different languages, the Lower function can also be tailored to suit. Within the mapping area, right-click the Lower function and choose Show Properties. You can choose languages from the Culture drop-down list and the Mapper will select lower case characters accordingly.

    Choosing a Language for the Lower Function

    This is a scalar function so the standard rules apply if multiple values are presented to one or more inputs.

    See Also