Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
GetFieldselections not working with AND Condition
=If(GetFieldSelections(Crop)='Tomato' and GetFieldSelections(Species)='Tomato',1,0)
Please help
Hi,
Here I found the solution for my question.
GetFieldSelections will return multiple value separated by commas in a single string if multiple values are selected, so the comparison to a single value in a string will not work.
=if(GetSelectedCount(Crop)>0 and GetSelectedCount(Species)>0 and
Match('Tomato',$(=concat(distinct chr(39)&Crop&chr(39),',')))>0 and
Match('Tomato',$(=concat(distinct chr(39)&Species&chr(39),',')))>0,
1,0)
First check in text object how it is coming based on that you can compare the value?
GetFieldSelections(Crop)
In Text Object , it is working fine . But not in chart
I meant to say, When you use text object what is the output, can you show the result after you select Tomato from Crop?
Yes, when I select Tomato from Crop output is 0.
=If(GetFieldSelections(Crop)='Tomato' and GetFieldSelections(Species)='Tomato',1,0) output = 0
GetFieldSelections(Crop) OUTPUT= Tomato
Your second condition is failing because you are not selecting 'Tomato' from Species field. Select it and then check the result.
Yes in Text box with both the selection or either of selection , working fine.
But in Chart in Conditional show with AND Condition its is not working though working with OR Condition
Hi,
Here I found the solution for my question.
GetFieldSelections will return multiple value separated by commas in a single string if multiple values are selected, so the comparison to a single value in a string will not work.
=if(GetSelectedCount(Crop)>0 and GetSelectedCount(Species)>0 and
Match('Tomato',$(=concat(distinct chr(39)&Crop&chr(39),',')))>0 and
Match('Tomato',$(=concat(distinct chr(39)&Species&chr(39),',')))>0,
1,0)