function scenarioRunNames = getScenarioRunsFromStatus(~, runStatuses)
    % GETSCENARIORUNSFROMSTATUS Gets the Scenario names from the run status
    
    % Copyright 2019 The MathWorks, Inc.
    
    
    scenarioRunNames = cell(numel(runStatuses), 1);

    % for each run status
    for idx = 1:numel(runStatuses)
        runStatus = runStatuses{idx};
        % if it is a simulation type that has a specified parent (is a
        % simulation scenario)
        if ~isempty(runStatus) && isequal(runStatus.Type, fxptui.message('actionTypeSimulate')) && ~isempty(runStatus.ParentID)
            % add it to the list
            scenarioRunNames{idx} = runStatus.Label;
        end
    end

    scenarioRunNames = scenarioRunNames(~cellfun(@isempty,scenarioRunNames));
    
end

% LocalWords:  fxpopt FPT
