I am using a bridge parameter (which will be bound to a calendar range filter, but I am not here yet) and I try to test it.
It is a RangeMember, using the usual Y > M > D hierarchy.
This is my script, casting the lower bound to a string, formatted as a date:
var lower=$input$.Resolve().LowerBoundaryValue;
if (lower == null) {
return “1900-01-01”
} else {
DateTime v = lower.MemberTime;
return v.ToString(“yyyy-MM-dd”);
}
I can test this script from inside the data cube.
If I select myself a date (lower bound), my script returns the date. Good.
If I select a token (eg. last 30 days) I get “1900-01-01”, so the lower bound is always found as null (the upper one as well).
I thought that using .Resolve() was enough.
What am I doing wrong?
(on a side note, I am using Dundas 6.0.1, released yesterday)
Changing the first line to explicitly cast makes no difference:
var lower=((RangeMemberValue)$input$).Resolve().LowerBoundaryValue;
Thanks,