Initialize Grid App in Different Modules Depending on a Variable

I have a grid application which I want to initialize in different modules depending on a variable.
For example if [var_module] is equal to SUMM, the rid app should initialize in Summary Module…
if [var_module] is equal to SEAR, the rid app should initialize in Search Module… etc…

Thank you in advance!