Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have a language field and altenating states. ive set the alternate state of the object to use STATE1 for example and have the following measure:
=concat(distinct Mesure,'|',metric_sort_order_$(=only(language_code))) & '|'
for STATE1, i selected the lang_code = fr, but for default state lang_code=en
notice the embedded $expression. what i am observing is that the $expression is evaluated using the default state (en) even if the object were set to use the state STATE1. so this evaluates to
=concat(distinct Mesure,'|',metric_sort_order_en) & '|' - which is for default state
when i wanted it to be
=concat(distinct Mesure,'|',metric_sort_order_fr) & '|' - that is for STATE1
if i take this out and add the measure
=only(language_code)
it properly evaluates to the correct value for the state (fr)
i do understand that i can add {STATE1} in the expression. but for my purpose, i wanted it to inherit the state of the object.
anyone with thoughts on whats going on? the doc says:
thanks
edwin
I do not see the same behavior as you. In my similar test the $() expression is evaluated in the state of the containing object. What version are you using and can you upload a small example that demonstrates the problem?
-Rob
My test as well evaluates in the state of the containing object but I see wrong conversion in the expression editor, my expression evaluates for 'fr' but expression editor shows 'en', but I have seen such conversion bugs in the expression editor bottom section in the past as well.
I do not see the same behavior as you. In my similar test the $() expression is evaluated in the state of the containing object. What version are you using and can you upload a small example that demonstrates the problem?
-Rob
My test as well evaluates in the state of the containing object but I see wrong conversion in the expression editor, my expression evaluates for 'fr' but expression editor shows 'en', but I have seen such conversion bugs in the expression editor bottom section in the past as well.
Thank you very much for the swift responses. i did a little more testing after i saw your messages and realized we were thrown off by the message at the bottom of the xpression builder. in this example, i selected a language (fr) for state STATE1:
then i figured select something for the default state (en):
this means the expression checker uses the default state even if you selected a state for the object. so, going back, even if it says there is an error in the expression checker, we went ahead and tested without any selection for default state and it is working fine.
thanks,
edwin
hi,
yes this was my observation. saw this after i posted my reply
thanks
edwin