You need to sign in to do that
Don't have an account?

how to allow in the if loop if the decimal value is zero
Hi Experts,
I need to calculate two fieds which are decimals of place 0(1,0). now my requriment is that when Week__c/frequency__c output is 1.0,2.0 it should allow only 0 decimal place if not it should not allow in the loop. eg:output is 6.0 it should allow in the loop if the output is 6.1 it should not. can anyone help me pls.
thanks in advance
I need to calculate two fieds which are decimals of place 0(1,0). now my requriment is that when Week__c/frequency__c output is 1.0,2.0 it should allow only 0 decimal place if not it should not allow in the loop. eg:output is 6.0 it should allow in the loop if the output is 6.1 it should not. can anyone help me pls.
thanks in advance
Hope this works.
Thanks
Below is my code snippit can you help me how to use above functionality. pls
decimal week=Week__c;
system.debug('!!!!!week'+week);
decimal freuency= Frequency__c;
system.debug('!!!!!freuency'+freuency);
deciaml currentweek=week/frequency;
system.debug('!!!!!currentweek'+currentweek);
if(currentweek)
{
// do something