1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  | Quintiq file version 2.0 
 |  #parent: #root 
 |  Method TrimErrorMessage ( 
 |    String errormessage 
 |  ) as owning String 
 |  { 
 |    Description: 'Trim error message to be stored in LastDataExchangeErrorMessage to avoid error when storing macro plan in internal storage.' 
 |    TextBody: 
 |    [* 
 |      // Adhi Mar-10-2016 (created) 
 |       
 |      /* 
 |         Have to hardcore the position to start trimming, must be same as what is set in the string length 
 |         in internal data 
 |      */ 
 |      pos := 1997; 
 |      size := minvalue( pos, errormessage.Length() ) 
 |      value := errormessage.SubString( 0, size ); 
 |       
 |      return value; 
 |    *] 
 |  } 
 |  
  |