BizTalk Experts


FileMask Macros in Biztalk

It’s possible to set the filename of a messages that your are going to send out in the orchestration. Just set the  ‘ReceivedFileName’ context property of the outbound messages that you created.

This should look like this:
OutboundMessage(FILE.ReceivedFileName) = "TheNewFancyFileName.xml";

After this you have to set the filemask in the sendport to %SourceFileName% (it’s case sensitive). The %SourceFileName% macro does not need an additional extension (like .xml or .txt) after it like the %MessageId% macro.

Other possible macros

%MessageID%
Unique identifier of the message in BizTalk Server (GUID). The value is taken directly from message context property BTS.MessageID

%datetime_bts2000%
UTC date time in format YYYYMMDDhhmmsss, where sss means seconds and milliseconds (e.g. 199707121035234 means 1997/07/12, 10:35:23 and 400 milliseconds)

%datetime%
UTC date time in format YYYY-MM-DDThhmmss (e.g. 1997-07-12T103508)

%datetime.tz%
Local date time + time zone from GMT in format YYYY-MM-DDThhmmssTZD, (e.g. 1997-07-12T103508+800)

%time%
UTC time in format hhmmss

%time.tz%
Local time + time zone from GMT in format hhmmssTZD (e.g. 124525+530)


2 Comments so far
Leave a comment

Is it possible to combine these macros?

Comment by Niels Versteeg

Is it possible to combine these macros?

This is indeed possible, I used the next combination:

%SourceFileName%_%datetime_bts2000%.txt

Comment by biztalkexperts




Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>