Dynamic Widget Titles & Widget Visibility

first post so apologies if this has been requested or solved before.

Is there a way to assign a variable or combination of variables as a widget title based on a condition - in my instance I only want to display active run statistics for a process in progress. so I have defined an active/inactive flag to use as the filter - I then want the system to display a Prod Line Number, customer name/ run ID and product name as the widget title and the stats to be displayed below.

Widget visibility I would like the widget to hide if there is no active run in progress