Versions Compared

Key

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

...

  • replaceAll( string: String, regex: String, replacement: String)dagegen würde $1 der Ausdruckssprache verwenden und nicht das gewünscht Ergebnis liefern (wahrscheinlich wird es scheitern)
    • Similar to the Java replaceAll method.
    • Use of on $ und \ in replacement: If capturing groups from the regex are used in replacement e.g. $1, then  $1 is not a variable but an identifier of replaceAll similar to the Java method replace($myString, 'x', '-->$1<--')replacement.
    • Examples:

      Expression

      replaceAll(

      $js7OrderId,

      '^#([0-9]{4}-[0-9]{2}-[0-9]{2})#.*$',

      '$1'

      )

      JSON"replaceAll( $js7OrderId, '^#([0-9]{4}-[0-9]{2}-[0-9]{2})#.*$', '$1')"
      Sample Value2021-06-27
  • Analog zu Javas (replaceAll)[https://docs.oracle.com/javase/8/docs/api/java/lang/String.html#replaceAll-java.lang.String-java.lang.String-].

    Zur Angabe von $ und \ in replacement: Wenn Gruppen aus regex in replacement verwendet werden, also etwa $1, dann ist $1 keine Variable der Ausdruckssprache, sondern von replaceAll, wie in replace($myString, 'x', '-->$1<--'). replacement ist also ein String in Apostrophen. replace($myString, 'x', "-->$1<--") 

    • This example extracts the daily plan date from the build-in $js7OrderId variable, e.g. from an Order ID #2021-06-27#P0000000412-jdScheduleBusinessDays the date is extracted.


  • jobResourceVariable( string: <JobResource>, string: <Variable> )
    • The function provides access to JS7 - Job Resources: it reads from the Job Resource specified with the first argument and returns the value of the Job Resource variable specified with the second argument.
    • Examples:

      Expression
      jobResourceVariable( 'database', 'db_user' )
      JSON"jobResourceVariable( 'database', 'db_user' )"
      Sample Valuescott
      Expression
      jobResourceVariable( 'database_' ++ $country, 'db_user' )
      JSON"jobResourceVariable( 'database_' ++ $country, 'db_user' )"
      Sample Valuetiger

Further Resources

...