Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Macros in Link can be used to generate context that can be used for Filenaming keys, transport fields, tracking fields or custom purpurses.

The format of the macro is like this:

[[:identifier$arg$fallback:]]

Where the arg and fallback is optional based on identifier. When several args they are seperated by ;

Identifier can be:

  • CustomDateTime e.g. [[:CustomDateTime$ddMMyyyyhhmmssffff:]]

    • Valid mask for formating datetime is .Net DateTime ToString formats

  • UniqueId e.g. [[:UniqueId:]]

    • Will output a value like 785419c9-98e5-4eb5-831d-46741a54ce96

  • ExtensionOut e.g. [[:ExtensionOut:]]

    • Will output the format type default extention from the outgoing document config

  • FileNameIn e.g. [[:FileNameIn:]]

    • Takes the original filename the document arrived in. Be aware it might not be unique.

  • FileNameInNoExt e.g. [[:FileNameInNoExt:]]

    • Takes the original filename the document arrived in but without extension. Be aware it might not be unique.

  • CustomXPath e.g. [[:CustomXPath$:/[local-name()='EFACT_D96A_ORDERS']/[local-name()='BGM']/*[local-name()='BGM02']]]

    • Will get the value from the xpath, or if the expath return a string then the string

  • Context e.g. [[:Context$DocumentNumber;http://link.bizbrains.com/properties/document:]]

    • Will get a value from a context property.

  • Sequence e.g. [[:Sequence$MySeqNumber;0000000000:]]

    • Take a new sequence number. First parameter is the name of the sequence. Second parameter is optional and contains a mask for the sequence. Pad with 0 (zero) to ensure a number or # for optional number. E.g. 0000 will always output a 4 digit number event if the sequence is 5 digit. #0000 will always have at least 4 digits but will if the number is 5 digit it will contain 5.

Macroes can be combined like e.g.:

[[:CustomDateTime$yyyyMMddhhmmssffff:]]_[[:UniqueId:]].[[:ExtensionOut:]]

will result in e.g.:

202301100408458094_785419c9-98e5-4eb5-831d-46741a54ce96.xml

Usages

Macros can currently be used the following places:

  • Itinearary step parameters (textbox fields)

  • Transport configuration fields (textbox fields)

  • No labels