Need to put a condition for decimal optional field in case we are not getting the field value in the
I am getting some field as null from CDR (not always) and those are optional, for string type of field it is ok but in case of decimal or integer, I need to assign some default value otherwise it is throwing an error/warning like “Integer conversion failed”
I have tried to use different approach like:
1st approach:
Bool Wholesale_tax_rate = edrEmptyInput(DETAIL.WHOLESALE_CHARGED_TAX_RATE);
if (edrInputState(DETAIL.WHOLESALE_CHARGED_TAX_RATE) == EDR_INPUT_EMPTY)
{
logStdout("I am at EDR_INPUT_EMPTY equal 1 ");
}
else
{
logStdout("I am at EDR_INPUT_EMPTY not equal to 1 ");
}
But all the time it is going to if condition, whether the field is present in CDR or not. Please let me know my logic is correct or you have any better logic to avoid the warning/error. I have put the logic in the InGrammar of 1