on 2021 Sep 03 11:32 AM
I'm sure this is a simple-ish one - just can't suss it out.
I'm trying to get the member displaymode of dimensions in a table, then depending on the mode do other actions.
To get the current displaymode I use the code below:
(simply grabbing the display mode of the dimension in the first row)
var DIM = tbl_detail.getDimensionsOnRows()[0];
var MODE = tbl_detail.getDataSource().getMemberDisplayMode(DIM);
Console log shows me it's currently set to ID - DisplayId
What i'd like to do is something like:
if MODE === DisplayId then do something
else if MODE === DisplayDescription do something else
But I think I need to convert the returned mode to a string as currently I can't use the value in a script
Any idea how I can convert the value returned by the variable MODE into a string?
I've had a look at case / switch statements - but not really sure what i'm doing 😞
Request clarification before answering.
Well I overcomplicated that 🙂
So simple - this code works
if(MODE === MemberDisplayMode.DisplayId)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
31 | |
10 | |
8 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.