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

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

    Usage

    The Data Mapper String Upper function converts text String characters to upper case. If your source XML contains characters you wish to be stored entirely in upper 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 Upper 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 Upper Function

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

    String Upper Component

    String Upper Transform Added

    The String Upper 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 upper case. The output should be connected to the target item. In this case we are mapping from an attribute to an element:

    String Upper Transform Mapped

    We map the "contributor" attribute in the XML Reader to the "user" element in the XML Writer, converting to upper case at the same time. Finally let's connect 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 upper case as part of the mapping process.

    Properties

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

    Choosing a Language for the Upper Function

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

    See Also