Quintiq file version 2.0
|
#parent: #root
|
Method CanSelect (
|
output String feedback_o,
|
Boolean isdatasetstoreenabled
|
) declarative remote as Boolean
|
{
|
Description: 'Whether selecting a scenario online is possible or not'
|
TextBody:
|
[*
|
// derred, [dataset-store storage]
|
/* Not allowed to select a scenario if:
|
1. Scenario dataset is loading in progress [ Loading is now Async ]
|
2. Storage state is Dataset-Store storage, but the dataset store is not enabled
|
*/
|
|
if( this.IsLoadingInProgress() )
|
{
|
feedback_o := Translations::Scenario_CanSelect_LoadingInProgress();
|
}
|
else if( this.IsDatasetStoreStorage()
|
and not isdatasetstoreenabled )
|
{
|
storageState := this.State().ReplaceAll( GlobalParameters_MP::GetStringStorageState(), "" );
|
feedback_o := Translations::Scenario_CanSelect_DatasetStoreNotEnabled( this.Name(), storageState );
|
}
|
else if( not this.IsLoaded() )
|
{
|
feedback_o := Translations::Scenario_General_IsNotLoaded();
|
}
|
else if( this.IsDeleted() ) // #11026
|
{
|
feedback_o := Translations::Scenario_General_IsDeleted();
|
}
|
|
return feedback_o = '';
|
*]
|
}
|