There are a couple things that do not add up properly in your expression.
First of all the Conditional Show expression should be logical, so that it results in True or False. This means that you do not use a IF statement, instead you only use the IF statements condition part as your Conditional Show expression.
As you can see below the GetFieldSelections() inparams in your expression are not valid. The function will return a string, from which you should look for the FieldSelection in.
String GetFieldSelections( fieldname [, valuesep [, maxvalues=6 ]] )
My suggestion is that you first get the currently selected values
then you look for your preferred selection within the selected values
SubStringCount( GetFieldSelections(CurrencyType, ';'), 'Reporting Currency' )
By applying this to your requirements you should end up with a expression looking somewhat like;
SubStringCount( GetFieldSelections(CurrencyType, ';'), 'Reporting Currency' ) = 1 AND GetSelectedCount(country)=0
thanks for your help on this!
I still have a doubt though as only one part of what I expect is working.
SubStringCount( GetFieldSelections(CurrencyType, ';'), 'Reporting Currency' ) = 0 AND GetSelectedCount(country)=1
gives me the desired result for all cases, where no country is selected:
1. If Reporting Currency selected, table not shown
2. If Group Currenc selected, table shown.
However when I select a country, the table does not appear at all, independant of the currency selected, but infact, both currency types are valid if looking at one country only....
I was playing around with the expression, but I couln't figure out the proper one.
Thanks again for your help!
Ah, now I see that you have written Country = Blank in the initial description. Could you clarify if this means that you have a blank row in your list or if it means that no selections are made in the list?
GetSelectedCount(country)=1 will be true if the case is that you have a selection in your list that corrsponds to blank, meaning that one item actually is selected in the list.
Still it would make it easier to evaluate if you could provide a sample app as I do not really follow in detail on your setup with lists and chart objects.
I am attaching you a file, that helpt to understand the issue.
When I mean country = blank, I am refering to no selection made for country.....
I have a table, where I would like to show some financial indicators per country - as long as all countries are shown (=no country selected), the table only makes sense in Group Currency, not in Reporting (or country specific) currency. But once one country is selected, both Reporting and Group Currency are valid results....
Thanks a lot for your help!
Test.qvw 124.0 K
First of all you have missplaced the expression, it should be added as the Conditional Show and not as Calculation Condition.
Chart Properties > Layout > Show Conditional
A slight correction of my previous suggestion, if you want the user to select a country and a Currency Type except 'Reporting Currency';
SubStringCount( GetFieldSelections([Currency Type], ';'), 'Reporting Currency') = 0 AND GetSelectedCount(Country)>0
If you instead have Country as andatory and Currenc Type as optional;
(GetSelectedCount([Currency Type])=0 OR SubStringCount( GetFieldSelections([Currency Type], ';'), 'Reporting Currency' ) = 0) AND GetSelectedCount(Country)>0
See attached QVW for my example.
Test - tko.qvw 139.5 K