Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
IF Condition in column binding
csasaki
Hi I have a row that has literal values like "literal.state.1", "literal.state.2" but those are equal to a state like :
literal.state.1 really means "Open"
literal.state.2 really means "Assigned"
How can I make an IF condition in a new column binding. I was thinking something like this :
IF (row_literal_value =="literal.state.1") then "Open"
If (row_literal_value =="literal.state.2") then "Assigned"
.
.
.
If (row_literal_value =="literal.state.20") then "Closed"
Is that ok?
Find more posts tagged with
Comments
Hans_vd
Hi Csasaki,<br />
<br />
This would be the syntax:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if (dataSetRow["row_literal_value"] == "literal.state.1")
{
"Open";
}
else if (dataSetRow["row_literal_value"] == "literal.state.2")
{
"Assigned";
}
...</pre>
<br />
Hope this helps<br />
Hans
csasaki
If I have to many "IF"?
Is there any case? like
(row = " ") Case
Case =
"assigned"
case =
"in progress"
Hans_vd
Hi Csasaki,
BIRT has a feature especially designed for what you are trying to achieve.
If you select the datafield, you'll see a tab called "Map" in the property editor.
You might want to take a look at that.
Regards
Hans