Change material instance parameter in a widget

I have set the material as a Dynamic Material Instance but i cannot access the variables inside it. I however can access the variables this way if i add the material to an external static mesh. I am not sure if this feature works when I am accessing a Dynamic material instance that is applied inside a widget ?