yanweiyuan3
2023-10-27 d1d15b61dfcf7fd0f800b32359f082cf580ed556
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
31
32
Quintiq file version 2.0
#parent: SelectionKBBranch
Response OnCreated () id:Response_SelectionKBBranch_OnCreated
{
  #keys: '[105708.2.1191578305]'
  Body:
  [*
    //Select the first kb branch
    
    // if statement to prevent this from being fired again
    // when selection is changed. This fix is only needed for thin client.
    if( isnull( SelectionKBBranch.Data()) )
    {
      kbname := '';
      internalkbfullid := maxselect ( DataHolderKB.Data(), Elements.KBFullID, el,el.Name() = ScenarioManager.CompanyKBName(), el.ChangeNr() );
    
    
      if ( not isnull( Dialog.Data() ) and Dialog.Data().KBBranch()<>"")
      {
        kbname := Dialog.Data().KBBranch();
        internalkbfullid := maxselect ( DataHolderKB.Data(), Elements.KBFullID, el, el.Branch() = kbname and el.Name() = ScenarioManager.CompanyKBName(), el.ChangeNr() );
      }
    
      if ( not isnull( internalkbfullid ) )
      {
        SelectionKBBranch.Data( internalkbfullid );   // Need this because the data extractor still does not extract any data from data holder yet. Still no data in this Selection.
      }
    }
  *]
  CanBindMultiple: false
  DefinitionID: 'Responsedef_GUIComponent_OnCreated'
}