How to use context objects in digital views of JavaScript part of message prompt?

HI Team, I can not use user data from context object in my digital views. if I try to put something like
var c= context.entities.relation it does not take that if I mention that entity as mandatory where as if I provide some default values to that entity then it take that value.

Tell me solution of it. Thank you.