Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

  1. Open a project
  2. Click the Settings tab
  3. Open the Change Log Property Substitution section.



  4. Click Manage Properties



  5. Add or edit property keys and values, along with the contexts and labels to use to determine when to apply the property substitution. 



    Info
    titleNote

    Property statements that use the same name and value must also have a context or label set to differentiate them. That difference expresses the conditions where each value is used. 

    You cannot create more than one property setting for the same condition (contexts and labels settings). 


  6. If you provided values for Substitution Mode and Target, you must also select Reverse Substitute During diffChangelog for the project. See the section "Reverse Substitute During diffChangelog Option". 
  7. Click Save.

...

  1. The property seq.incrementBy is set in the changelog. Note that substitution mode set to always and target is specified. 
    Using the GUI:



    Property appearance in the changelog:

    Code Block
    <property name="seq.minValueincrementBy" value="2" context="REF" appdba:substitutionMode="always" appdaba:target=\createSequence\@incrementBy/>


  2. Reverse Substitute During diffChangelog project setting is enabled. 
  3. A script in the ddl folder contains the following code for creating a sequence. It uses the property ${seq.incrementBy} rather than a literal value, because you want to use a different value for different Datical contexts.  

    Code Block
    CREATE SEQUENCE century_years
      MINVALUE 1
      MAXVALUE 100
      START WITH 1
      INCREMENT BY ${seq.incrementBy}
      CACHE 20;


  4. When the script is packaged, the property is evaluated during packaging to seq.incrementBy, which is set in the property to 2. The resulting changeset 

    Code Block
        <changeSet author="datical" context="REF" created="Thu Sep 20 09:09:34 CDT 2018" id="create_seq_REF" objectQuotingStrategy="QUOTE_ALL_OBJECTS">
            <createSequence cacheSize="20" incrementBy="2" maxValue="100" minValue="1" sequenceName="century_years" startValue="1"/>
        </changeSet>


  5. During reverse substitution, the property expression ${seq.minValueincrementBy} is re-substituted for REF for the value "2"  that was placed in the changeset. The changeset includes the following string:

    Code Block
    incrementBy=${seq.incrementBy}


...