I am converting a string field to decimal. Null values and " " are taken care of.
The original derivation is like :
if stgFICODOMSUBIND=2 then stringtodecimal(trim(nulltovalue(lnkCIIOut.RE_CGSB_SCR_2,-9999))) else stringtodecimal(trim(nulltovalue(lnkCIIOut.RE_CGSB_SCR_1,-9999)))
I tried with more descriptive derivation like :
if stgFICODOMSUBIND=2 then
if trim(lnkCIIOut.RE_CGSB_SCR_2)=" " then
-9999
else
stringtodecimal(lnkCIIOut.RE_CGSB_SCR_2)
else
if trim(lnkCIIOut.NRE_CGSB_SCR_1)=" " then
-9999
else
stringtodecimal(lnkCIIOut.NRE_CGSB_SCR_1)
But didn't help.
APT_CombinedOperatorController(3),1: Null string argument.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 4
- Joined: Wed Feb 20, 2008 4:57 am
- Location: Pune
Try this. If the input is black or just a space then you should be comparing the output of the trim() with ""(empty).
Code: Select all
if stgFICODOMSUBIND=2 then
if trim(lnkCIIOut.RE_CGSB_SCR_2)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_2) then
stringtodecimal("-9999")
else
stringtodecimal(lnkCIIOut.RE_CGSB_SCR_2)
else
if trim(lnkCIIOut.NRE_CGSB_SCR_1)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_1) then
stringtodecimal("-9999")
else
stringtodecimal(lnkCIIOut.NRE_CGSB_SCR_1)
-
- Participant
- Posts: 4
- Joined: Wed Feb 20, 2008 4:57 am
- Location: Pune
Hi!
Thnks for the input. actually error was in other field derivation :
derivation was like :
if num(trim(nulltoempty(column_name)))=0 .
i removed the trim..... warning vanished!
Thnks for the input. actually error was in other field derivation :
derivation was like :
if num(trim(nulltoempty(column_name)))=0 .
i removed the trim..... warning vanished!
Maveric wrote:Try this. If the input is black or just a space then you should be comparing the output of the trim() with ""(empty).
Code: Select all
if stgFICODOMSUBIND=2 then if trim(lnkCIIOut.RE_CGSB_SCR_2)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_2) then stringtodecimal("-9999") else stringtodecimal(lnkCIIOut.RE_CGSB_SCR_2) else if trim(lnkCIIOut.NRE_CGSB_SCR_1)="" Or IsNull(lnkCIIOut.RE_CGSB_SCR_1) then stringtodecimal("-9999") else stringtodecimal(lnkCIIOut.NRE_CGSB_SCR_1)
sWaTi