on 03-12-2010 2:09 PM
IF C2_INPUT Exits then C2_INPUT eq C2_Output
else
C1_INPUT--JDBCLOOKUP = C2_Output
I am doing a graphical mapping and its working when C2_INPUT value is not null .If C2_INPUT value is blank then
I will take C1_INPUT and do a JDBC lookup and populate C2_OUTPUT.
we need to populate C2_OUTPUT based on C2_INPUT .
I did a Display Q and the value for C2_output is null whenever the expression fails (C2_INPUT is blank)
Here is my srcuture
INPUT ITEM OUTPUT ITEM
C1_INPUT <.> C1_OUTPUT
C2_INPUT C2_OUTPUT(graphical mapping).
I am on PI 7.0
Any thoughts are helpful and rewarded !
Hi Kumar,
Use a simple if else without exists function should work for you. Because when you use if condition it automatically checks for exists only. So you dont need to do exists check. Try out and let us know.
Regards,
---Satish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Folks before the post I was using boolean function instead of EqualsS and was stuck with syntax error " Cannot cast to boolean (since only True or Flase is expected)"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As correctly said by Sandeep.. but just a small correction to his solution.. use the NOT function after equalS function.. e.g.
C2_INPUT ------------------->|
equalsS ----->NOT--->IF --->THEN ---->C2_INPUT
Blank Constant(' ')--------->|
ELSE ---->C1_INPUT
Regards,
Sarvesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When you are checking C2_INPUT using exists, it can be a problem here.
In place of EXISTS function
use C2_INPUT --> NOT (Boolean Function) --> EqualsS (For text compare) or EqualsA (For Arthematic Compare) -->
In second part of Equal pass Constant Value ' '
CONSTANT ' ' (pass only space in that).
I hope it will work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.