Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
if(Region='EMEA','c:/Red.png',
if([Region]='APAC','c:/green.png'))
This expression is not working in a default view in straight table where as it changes the image when I select that particular region.Any idea ?
Thanks much.
Hi,
you might use this expression in a context where [Region] delivers more than one value, i.e. the default aggregation function "only()" returns a null value. Only when selecting a specific region, one of the conditions is fulfilled and your expression returns an image path.
See also:
hope this helps
regards
Marco
Not sure what you are talking about. Could you post a small sample QVW that demonstrates the issue?
Hi Ansh,
The problem is the bracket []. Just remove
if(Region='EMEA','c:/Red.png',
if(Region='APAC','c:/green.png'))
tried..but doesnt work
What happen? print the message pls
Did you change the representation in Expression tab to Image. Like:
= Pick(Match(Region, 'EMEA', 'APAC') , 'c:\Red.png', 'c:\green.png'))
Hi,
you might use this expression in a context where [Region] delivers more than one value, i.e. the default aggregation function "only()" returns a null value. Only when selecting a specific region, one of the conditions is fulfilled and your expression returns an image path.
See also:
hope this helps
regards
Marco
Thank you.Only() function works but I also wanted to try the below method.Is there anything wrong in the below expression ?just as a back up as I am applying this to API.
=if(GetSelectedCount([Region])='EMEA', 'c:\Red.png','c:\Red.png' AND
IF(GetSelectedCount([Region])='APAC','c:\yellow.png', 'c:\yellow.png' AND
IF (GetSelectedCount(Region])='AMER', 'c:\green.png', 'c:\green.png')))
Thank you much
Ansh, GetSelectedCount() returns an integer so may be use GetFieldSelections([Region]).
glad it worked.
Can you please post some sample data and your expected result for this expression, as using AND as a string operator seems a bit odd?
thanks
regards
Marco