1 Reply Latest reply: Mar 2, 2018 9:33 AM by Jay Garcia RSS

    Issue with case of a variable with a parameter

    Jay Garcia

      Hi guys,

       

      I need some help with this case of variables with parameters on QS.

       

      I need to create a dynamic Label expression for the dynamic dimension _SPEC1 or _SPEC2. The labels could be either _LONG_SPEC_NAME1 or _LONG_SPEC_NAME2 fields which will depend on the condition if CUSTOM_GROUP field count is 0 then _LONG_SPEC_NAME1 else _LONG_SPEC_NAME2. But I also need to evaluate if GetPossibleCount(_SPEC1)<>1 then this message should appear instead in the Label: 'Select One Dimension Only'.

       

      I've done this:

       

      Label Expression:

      =if(Count({1} CUSTOM_GROUP)=0,'$(vSpecTitle(1))','$(vSpecTitle(2))')

       

      Where vSpecTitle=

      IF(GetPossibleCount(_SPEC$1)<>1,'Select One Dimension Only', _LONG_SPEC_NAME$1)

       

      For some reason, it's showing me 'Select One Dimension Only' even though I can see in the Text box that Count({1} CUSTOM_GROUP) is 0 and GetPossibleCount(_SPEC1) is 1 which should show  _LONG_SPEC_NAME1. So something it's not right in my expressions.

       

      Any thoughts?