EDI Export - Advanced Helper Functions

EDI Export - Advanced Helper Functions

EDI Export - Advanced Helper Functions


This article will show you the avaliable helper functions to display data in meaningful ways on you report.


Replace Lookup

Takes the input string and replaces Value1 with Value2 for each occurance
Code: {ReplaceLookup(input, [Value1|Value2])}

Returns: String with replacement commplete


Total number of pallets on a consignment

Code: {ConsignmentTotalPallets(idConsignment)}

Returns: Number


Total number of non pallet items on a consignment

Code: {ConsignmentTotalNonPallets(idConsignment)}

Returns: Number


Trim or Pad a string to a length to the right

Code: {TrimPad(string, length)}

Returns: "TEST     "



Trim or Pad a string to a length to the left

Code: {TrimPadLeft(string, length, padValue)}

Returns: "     TEST"


Max width of a string in characters

Code: {Max(str, length)}

Returns: " TESTIN"



Hour Range

Provides a time range an hour before and an hour have the tame passed in

Code: {HourRange(object dateTime)}

Returns: " 13:45-15:45"



Split string on a character and return a specific element

This function enables you to split a string based on a character and return a specific element of that back

Code: {Split(String, Split Value, ReturnNumber)}

Example: {Split("this|is|a|test", string "|", 1)}

Returns: " this"


Dates

@Model.Date

That would output a string in the default culture date time string. For greater control, you could do the following:

@Model.DateDateTime which converts the string to a datetime object which then allows all .net functions such as @Model.DateDateTime.ToString(“dd/MM/yyyy”)

@Model.DateDateTimeUTC – same as above, but in place of the client time zone will be UTC time

@Model.EventLocationDateTime – same as above, but the timezone of the event. Only used if client has multi offices with different timezones.


Same for decimal, example @Model.Cubic would be a string, if we need to call .net functions, can convert to a decimal via:

@Model.CubicDecimal then allows things like @Model.CubicDecimal.ToString(“n3”) which would be converted to 3 decimal places with standard 1000 , format

    • Related Articles

    • Invoice EDI Export

      Invoice Export Setup In TransVirtual you can setup an EDI (Electronic Data Interchange) that automatically sends PDF, Excel, CSV (etc.) Invoice files to a Customer or Agent, based on specific situations. So, when an Invoice is Approved and Locked you ...
    • Proof Of Delivery EDI Export

      Proof Of Delivery EDI Export In TransVirtual there is the ability to setup Proof Of Delivery EDI (Electronic Data Interchange) Export Rules that can send out Proof Of Delivery (POD) information to a location, via FTP, Email, etc.  This page can be ...
    • Additional Service EDI Export

      Additional Service EDI Export In TransVirtual there is the ability to create Additional Service EDI (Electronic Data Interchange) Export Rules that can send out information from TransVirtual to a location; this can be done using FTP, Email, etc. ...
    • Consignment Status EDI Export

      Consignment Status EDI Export In TransVirtual there is the ability to create Consignment Status Export EDI (Electronic Data Interchange) rules that send out status update information about a consignment, to a location; via FTP, Email, etc. This page ...
    • Advanced Mobile Equipment

      Located under Configuration > General > Global Setup > General tab there is the below setting: Enabling this setting allows for increased equipment monitoring functionality including equipment endorsement on freight arriving at depot, equipment ...