on 09-16-2011 1:46 PM
Hi all,
i have a field called failedsubject in my target my requirement is if their is no value in this field then it has to be deleted means it should not be shown iam using graphical mapping. please help me
thanks in advance
Check marks at the source using if and constant function( pass value here) and based on the output result use createif to create target structure. Very simple.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Please try with the below logic.
public String failedSubject(String sub1, String sub2, String sub3, Container container) throws StreamTransformationException{
if (Integer.parseInt(sub1) >= 40) //assuming 40 as passmark
if (Integer.parseInt(sub2) >= 40)
if (Integer.parseInt(sub3) >= 40)
return false;
else
return true;
else
return true;
else
return true;
}
failedSubject---->ifWithoutElse-->failedSubject
pass all subjects as input to the UDF.
Regards
Priyanka
Edited by: priyanka.anagani on Sep 16, 2011 3:26 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Map with ifwithoutelse condition in graphical mapping
If source ------>equals(blank)------------>Not------>ifwithoutelse----------->Target
source------->
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Here you can write a UDF where Marks and Subject (Remove Context) will be input to it.
Logic would be to loop on each subject and its mark and check if all subjects are passed. If not, set a flag and pass it as output of the UDF. Now take this output, put ifelse condition and either create or suppress target field failedSubject based on your ifelse condition.
Regards,
Amol
Edited by: AMOL BHARTI on Sep 16, 2011 3:14 PM
Use CreateIF Function.
Regards,
Gouri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.