Quintiq file version 2.0
#parent: #root
Method UISetLabelTimeUnitMaximum (
  Boolean isInit,
  String timeunitScrValue
) id:Method_DialogCreateEditPostponementSpecification_UISetLabelTimeUnitMaximum
{
  #keys: '[135040.0.274705025]'
  Body:
  [*
    // Set labels time unit for different time unit selected
    // ***timeunitScrValue has to be an argument because getting it inside this method directly causing error (via StringListHorizonTimeUnit.Text())
    data     := DataHolderDialogData.Data().WrappedInstance();
    
    //set max label
    maximumDataValue   := guard(data.MaxTimeUnit(), Translations::MP_GlobalParameters_Day() ); //default is day
    maximumScrValue    := guard( timeunitScrValue, "" );
    maximumValue := ifexpr( isInit,
                            maximumDataValue,
                            maximumScrValue );
    
    NumberPickerMaxNrOfTimeUnit.Label( Translations::MP_Designer_Duration_with_time_unit( maximumValue ) );
  *]
}
