Is it possible to insert the current dialog into the profile by using the following way?

modparam("dialog", "profiles_no_value", "mytest;xyz")

$var(profilename)="xyz";
set_dlg_profile(" $var(profilename) ");

Currently it is giving errors and not allowing to use variable instead of static profile name.

Or is there any alternative to pass profile name as variable?

---
Thanks,