Hi Imram,
Good question, and yes, this is possible.
I'd store the color using a calculate like this:
if((${answer} < 5), 'green', if((${answer} < 7), 'yellow', 'red'))
Instead of red/yellow/green, you can also use hex color codes like '#f58a1f'
Then build the resulting output like this:
concat('', ${answer}, '')
Then that resulting output can be put in any label or hint. I've
attached a sample form that does this.
Yaw
conditional_color.xlsx (10.4 KB)
ยทยทยท
On Mon, Mar 27, 2017 at 5:01 PM, A.N.M AL-IMRAN wrote:
> Dear Friends,
>
> I need help with a conditional statement. Under which column and how do I
> write an if statement in xls form to change colour of answer of a
> calculation. For example if my answer is les than 5 I want the result should
> display in Green colour, if within 5-7 the colour should be yellow and it
> within 7-10 it should be Red. You help will be highly appreciated.
>
> Thanks,
> Imran
>
> --
> --
> Post: opendatakit@googlegroups.com
> Unsubscribe: opendatakit+unsubscribe@googlegroups.com
> Options: http://groups.google.com/group/opendatakit?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "ODK Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to opendatakit+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.