Can a variable be used like this code in the macro expressions to retrieve values dynamically?
I am trying the code below which return as null.
var indexId = 45;
return CMSContext.Current.GlobalObjects.Users[indexId].DisplayName;
Can a variable be used like this code in the macro expressions to retrieve values dynamically?
I am trying the code below which return as null.
var indexId = 45;
return CMSContext.Current.GlobalObjects.Users[indexId].DisplayName;
I figured that the code should be on the same line. Earlier I was declaring the variable in separate line. So this works now
indexId = 45;return CMSContext.Current.GlobalObjects.Users[indexId].DisplayName;