Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method GetImage ( 
 | 
  LibSOPImpExp_DataSource datasource_i 
 | 
) declarative as String 
 | 
{ 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Display associated image based on whether the files uploaded is matching with files required 
 | 
    value := ""; 
 | 
     
 | 
    // Find import object group in user import profile that is matched with datasource 
 | 
    matched_iog := this.GetMatchingImportObjectGroup( datasource_i, false ); 
 | 
    isGroup := isnull( datasource_i.LibSOPImpExp_DataSourceParent() ); 
 | 
    isSource := datasource_i.LibSOPImpExp_DataSourceChild( relsize ) = 0; 
 | 
    selectedFiles := selectvalues( this, LibSOPImpExp_ImportUploadedFile, file, true, file.FileName() ); 
 | 
    filesRequired := null( Strings ); 
 | 
     
 | 
    if( isSource ) 
 | 
    { 
 | 
      filesRequired := selectvalues( datasource_i, LibSOPImpExp_DataSourceFile, file, true, file.FileName() ); 
 | 
      value := this.GetImage( matched_iog, false ); 
 | 
    } 
 | 
    else if ( isGroup ) 
 | 
    { 
 | 
      filesRequired := selectvalues( datasource_i, LibSOPImpExp_DataSourceChild.LibSOPImpExp_DataSourceChild.LibSOPImpExp_DataSourceFile, 
 | 
                                     file, file.LibSOPImpExp_DataSource().DisplayFileNames().Length() > 0, file.FileName() ); 
 | 
    } 
 | 
    else 
 | 
    { 
 | 
      filesRequired := selectvalues( datasource_i, LibSOPImpExp_DataSourceChild.LibSOPImpExp_DataSourceFile, file, 
 | 
                                      file.LibSOPImpExp_DataSource().DisplayFileNames().Length() > 0, file.FileName() ); 
 | 
    } 
 | 
     
 | 
    if( selectedFiles.ContainsAll( filesRequired ) ) 
 | 
    { 
 | 
      value := this.GetImage( matched_iog, true ); 
 | 
    } 
 | 
    else if( selectedFiles.Intersect( filesRequired ).Size() > 0 ) 
 | 
    { 
 | 
      if( isSource ) 
 | 
      { 
 | 
        value := this.GetImage( matched_iog, false ); 
 | 
      } 
 | 
      else 
 | 
      { 
 | 
        value := "ARROW_MIX"; 
 | 
      } 
 | 
    } 
 | 
    return value; 
 | 
  *] 
 | 
} 
 |