lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Quintiq file version 2.0
#parent: #root
StaticMethod ValidateInput (
  output String feedback_o,
  MPSync owner,
  UserImportProfile userimportprofile,
  String name
) declarative remote as Boolean
{
  Description: 'Validate the name and excel path of this import profile'
  TextBody:
  [*
    result := true;
    
    if( name = '' )
    {
      feedback_o := Translations::MPSync_ImportProfile_ValidateInput_IsInvalidName();
      result := false;
    }
    else if( exists( owner, UserImportProfile, u, 
                     u <> userimportprofile, 
                     u.Name() = name ) )
    {
      feedback_o := Translations::MPSync_ImportProfile_ValidateInput_IsNameExists();
      result := false;
    }
    
    return result;
  *]
}