hongji.li
2023-11-05 2713c338a98325cad21ebec2085802a5e49a98ef
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
Quintiq file version 2.0
#parent: #root
Method GetActivatedFormIteration () as LibOpt_FormIteration id:Method_LibOpt_GlobalState_GetActivatedFormIteration
{
  #keys: '[151132.0.11775720]'
  Body:
  [*
    // Get an activated LibOpt_FormIteration instance.
    
    formiteration := select( Application.Frame(), SubComponents.astype( LibOpt_FormIteration ), form, true );
    
    // Construct the form if it doesn't exist yet.
    if( isnull( formiteration ) )
    {
      formiteration := construct( LibOpt_FormIteration );
      Application.Frame().ShowForm( &formiteration );
    }
    
    // Set focus on the form.
    formiteration.Activate();
    
    // Clear the current selections in the list.
    listiteration := formiteration.ListIteration();
    listiteration.SelectByKey( Key::ZeroKey() );
    
    return formiteration;
  *]
}