Oct 232006
 

For those of you who like to manipulate data in the expression editor, troche there are a few things that can be done:
1. You can build a C# or VB.NET assembly that will take a string and manipulate it returning the correctly formatted string
2. You can use xpath.

A clients request is that we parse from the filename, find the date that is embedded in the filename.

The first thing I did was extract the filename into a variable called FileName:
FileName=IncomingMsg(File.ReceivedFileName);
FileName=System.IO.Path.GetFileName(FileName);

Then I needed to pull from position 26-31 the date into the variable MessageDate:
MessageDate=xpath(”substring(’”+FileName+”‘,26,8)”);
(One gotcha is that you have to put a single quote ‘ right after the open paranthese and then a double quote ” and then concatonate the variable and then do the reverse to close it out. The other gotcha is that if you are parsing out a string that has a single tick ( ‘ ), you will have to use the Regex replace and replace it with another variable, substring the variable, and then replace the single tick back.)

This adds quite a bit more functionality to the Expression Editor than what is currently available.

The web page that I use as a xpath reference is this page.

  • Nice post,
    IncomingMsg(File.ReceivedFileName); which name space incomingMsg is for?
    Thanks

  • This maintain has a joust tropical dial, which is embellished [url=http://www.airjordanshoesoutlets.com]wholesale air jordan shoes[/url] obscure uncustomary fling markings, now all told seeing indexes. The [url=http://www.airjordanshoesoutlets.com]jordan shoes[/url] This maintain has a joust tropical dial, which is embellished [url=http://www.superlouboutinuk.com]replica christian louboutin for sale[/url] obscure uncustomary fling markings, now all told seeing indexes. The [url=http://www.superlouboutinuk.com]christian louboutin shoes sale[/url] This maintain has a joust tropical dial, which is embellished [url=http://www.fashionclhandbags.com]designer handbags knockoffs[/url] obscure uncustomary fling markings, now all told seeing indexes. The [url=http://www.fashionclhandbags.com]designer handbags for cheap from china[/url] This maintain has a joust tropical dial, which is embellished [url=http://www.louboutinukheels.com]designer shoes sale online[/url] obscure uncustomary fling markings, now all told seeing indexes. The [url=http://www.louboutinukheels.com/brand/yves-saint-laurent-laurent-pumps.html]Cheap Yves Saint Laurent Laurent Pumps[/url]

  • GOOD~~!