Hi. I have a doubt in nested if's
here, if the first condition is true, then it will be return the statement "should be 18 digits". If it's false, I want null value to be returned. Since I am using nested if's its returning "must be numerical and no more than 12no's". how can we resolve this. Can someone help me here?
Discussion posts and replies are publicly visible
Can you tell what are you trying to check in the first and second and conditions?? you can try swapping the if conditions and check it out. It might help. it could be something likeif(
and(),
"must be numerical and no more than 12 numbers",
if(
"should be 18 digits",
{})
)
In those conditions I am checking the length of the field based on the input
try something like this
with the above code, the second if is not working properly
You can try using not condition outside and or some other logic and achieve what you want
hema.mathivathanan said:the second if is not working properly
To be clear, the second if() will only ever execute when the first if() resolves to FALSE.
If this is not what you want to happen, then you will need to restructure your if() nesting to flow logically per what you want to happen.