---
title: "expression is working reversely"
url: "https://openforis.support/questions/2664/expression-is-working-reversely"
tags: ["collect"]
status: "answered"
score: 0
answer_count: 1
asked: "2020-02-08T12:23:28"
last_activity: "2020-02-09T03:02:07"
source: "Open Foris Support - Q&A Forum"
license: "Copyright Open Foris, 2026. Some rights reserved under creative commons license."
---

# expression is working reversely

Asked by Rajkumar on 2020-02-08

Dear OFT,
I created a **species** attribute (with taxon data type). where different type of spp can be chosen as usual. I also created sppgrp (calculated field). I want when a user chose **shorea robusta** then **sppgrp** should get value **1**. for this I put **1** in expression and **species = "shorea robusta"** in **apply when** area, It is not working(not giving value 1). instead if I put **species != "shorea robusta"** then it works fine. Did I wrote code in wrong way? I think something is wrong. I am using collect Version: 3.25.1. please suggest me if the coding style is changed.

> Now It is working. What I did is that I put species/@ScientificName (Rajkumar)

## Answer (score 0, by Stefano (OF) on 2020-02-08)

Link: https://openforis.support/questions/2664/expression-is-working-reversely/2667

Hi Rajkumar,  
Is "shorea robusta" the correct "code" of the species? When you are using taxon attributes, you should refer to selected species code, not to the scientific name.  
Let us know, many thanks.  
Open Foris Team

> Thank you for your response. But it is working fine. I will follow your suggestion. (Rajkumar)
