| Resolution: |
To fix this error, you will require a manual code snippet funtion that will essentially do the same as a function.
To write this code snippet you will need to do the following :-
1. Remove the Function and replace the map connections with a single connector.
2. Select the newly made map connection and click the Code Snippets tab in the bottom left of your screen.
3. Enter the following code :-
try
{
//Creates function parse
string strDTM00020 = XE.GetString("#VALUE");
xedate dtFUNC001;
dtFUNC001 = xedate.Parse(strDTM00020, "g", DOMAP);
string strFUNC001 = dtFUNC001.ToString("dd/MM/yyyy HH:mm");
SRC = Convert.ToString(strFUNC001);
}
catch (Exception ex)
{
//Logs an error if one is present
XE.Log("MAP990QE", "An error has occurred in Function 'FUNC001' of type 'DateTime.Convert'");
//Information inside quotes can be changed
XE.Log("MAP990RE", "This is connected to 'Target node' '2380 - Date/time/period'");
XE.Log("MAP990SE", "The reason was...");
XE.Log("MAP990TE", ex.Message);
ApplicationException ax = new ApplicationException("Error in DateTime.Convert - see log for details");
ax.Source = "MAP990UE";
throw ax;
}
|