| Author |
Message |
trac
Newbie
Joined: 25 Apr 2012
Online Status: Offline
Posts: 13
|

Topic: Use Formula field in select record Posted: 08 Dec 2013 at 3:24am |
|
created a formula field called Fieldname which I wish to filter data through select expert. is this the right way? or do I need to create a parameter? In Formula editor this is the formula used: If table1.column1 in [value1, value2,value3, value4] then column1 else if isnull table1.column1 then table2.column2.
In short if table1.column1 is in the 4 values pick that value else if table1.column1 has null values pick up value from table2.column2. Table1 and table2 are inner joined. This value of Formula field is just for filtering data and is not required to display in the report. I am NOT getting the desired result. Any suggestions appreciated.
|
IP Logged |
|
|
|
lockwelle
Moderator
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
|

Posted: 09 Dec 2013 at 5:18am |
|
a filter formula returns true or false...true-include the row in the report, false-omit the row.
your formula seems to be more about display. to make it more of filter:
isnull({table1.column1}) or {table1.column1} in [value1,value2, value3, value4]
this will return true or false.
HTH
|
IP Logged |
|
trac
Newbie
Joined: 25 Apr 2012
Online Status: Offline
Posts: 13
|

Posted: 09 Dec 2013 at 5:02pm |
|
Thanks. But It didn't help. Is there any other way round?
I am joining 2 tables which has 1 column called state. I wish to check if table1.state IN ["value1, value2] then pick table1.state else if
table1.column1 has null values pick up value from table2.state. Any suggestions appreciated.
|
IP Logged |
|
Sastry
Moderator
Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
|

Posted: 09 Dec 2013 at 10:24pm |
|
Hi
Your formula is more on defining condition, so create same formula under formula fields (not in record selection formula) like :
@Formula If table1.column1 in [value1, value2,value3, value4] then column1 else if isnull table1.column1 then table2.column2
Now go in record selection formula and give below condition :
{@formula} = True
This will pickup only required record set.
|
|
Thanks,
Sastry
|
IP Logged |
|
trac
Newbie
Joined: 25 Apr 2012
Online Status: Offline
Posts: 13
|

Posted: 10 Dec 2013 at 2:18am |
|
Thanks Sastry. Yes I did create a formula field and in record selection did select formula field = True, then I get zero results.
|
IP Logged |
|
kostya1122
Senior Member
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
|

Posted: 10 Dec 2013 at 9:20am |
|
i think you need
formula1
if isnull(table1.column1) then table2.column2 else
table1.column1
select expert
formula1 in [value1, value2,value3, value4]
|
IP Logged |
|
|
|