mstrio > project_objects > helpers¶
- mstrio.project_objects.helpers.answer_prompts_helper(instance_id, prompt_answers, get_status_func, get_prompts_func, answer_prompts_func, force)¶
Helper function to answer prompts for a report or dashboard/document.
- Parameters:
instance_id (str) – Instance ID of the report or dashboard/document.
prompt_answers (list[Prompt]) – List of Prompt class objects answering the prompts.
get_status_func (callable) – Function to get the status of the report or dashboard/document.
get_prompts_func (callable) – Function to get the prompts for the report or dashboard/document.
answer_prompts_func (callable) – Function to answer the prompts for the report or dashboard/document.
force (bool) – If True, then the report/document/dashboard’s existing prompt will be overwritten by ones from the prompt_answers list, and additional input from the user won’t be asked. Otherwise, the user will be asked for input if the prompt is not answered, or if prompt was already answered.
- Returns:
True if prompts were answered successfully, False otherwise.
- Return type:
bool
- mstrio.project_objects.helpers.get_prompt_answer(prompt, prompt_answers, force)¶
- Parameters:
prompt (dict) –
prompt_answers (list[dict]) –
force (bool) –
- Return type:
Any | list[Any]