OtherFieldValue

OtherFieldValue

Writes out the field value generated in another field in the same table. Needs a <reference> element as content which defines the reference to use.

Attributes
Name Description Required Min Max Allowed Values
seed Random number generator seed of this Element. Overrides default seeding behavior. no 0 1
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
Nodes
Name Description Required Min Max Allowed Values
reference reference yes 1 1

Example

  1. Person with Email Address

    Generates email addresses based on the given first and last name of a person.

    Schema config for Person with Email Address
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!--
    /*******************************************************************************
    * Copyright (c) 2013, bankmark and/or its affiliates. All rights reserved.
    * bankmark UG PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
    ******************************************************************************/
    --><schema xmlns:doc="http://bankmark.de/pdgf/doc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="demo" xsi:noNamespaceSchemaLocation="structure/pdgfSchema.xsd">
      <!-- All data is derived from this starting seed.
           If this seed is the same, the generated data will the same on each
           computer/node/platform.
           Change this seed to generate a different data set.-->
      <seed>1234567890L</seed>
    
      <rng name="PdgfDefaultRandom"/>
    
      <!--Default Scale factor for all tables -->
      <property name="SF" type="double">1</property>
    
      <table name="PERSON">
        <!-- if tables should scale with -SF command line argument.
             Specify your scaling formula here: -->
        <size>10 * ${SF}</size>
    
        <!--Person with Email Address-->
          <!--Generates email addresses based on the given first and last name of a person.-->
          <field name="first_name" type="VARCHAR">
            <gen_DictList id="first_name_gen">
              <file>dicts/Given-Names.dict</file>
            </gen_DictList>
          </field>
          <field name="last_name" type="VARCHAR">
            <gen_DictList id="last_name_gen">
              <file>dicts/Family-Names.dict</file>
            </gen_DictList>
          </field>
          <field name="company_email" size="" type="VARCHAR">
            <gen_Sequential concatenateResults="true">
              <gen_OtherFieldValue>
                <reference field="first_name"/>
              </gen_OtherFieldValue>
    
              <gen_StaticValue>
                <value>.</value>
              </gen_StaticValue>
    
              <gen_OtherFieldValue>
                <reference field="last_name"/>
              </gen_OtherFieldValue>
    
              <gen_StaticValue>
                <value>@company.com</value>
              </gen_StaticValue>
            </gen_Sequential>
          </field>
          </table>
    </schema>
    
    Output for Person with Email Address
    Annie|Pai|Annie.Pai@company.com
    Helma|Pietrzak|Helma.Pietrzak@company.com
    Ruthe|Gregory|Ruthe.Gregory@company.com
    Krystn|Konno|Krystn.Konno@company.com
    Ilyse|Xavier|Ilyse.Xavier@company.com
    Ermina|Najafi|Ermina.Najafi@company.com
    Jayendra|VMXA|Jayendra.VMXA@company.com
    Cuong|Zumhagen|Cuong.Zumhagen@company.com
    Bev|Bates|Bev.Bates@company.com
    Jacquelynn|Crompton|Jacquelynn.Crompton@company.com
2.6_#1486_b758 | 2016-05-24