You need to sign in to do that
Don't have an account?
Chirag Verma 13
Need to a write validation if Last_Month__c = June then we can enter values upto June_c only
Hi,
My requirement is when ever we enter Last_Month__c = June then we should able to enter Amount values upto June Month only. If we
try to enter July month to till December then that it should throw an error.
Note - There is a field called Starting_month__c so we enter a valuein that field for idea purpose when will be the starting month.
Last_Month__c is Picklist field and January , February, so on fields data type = 'Number'.
This sceniero is possible through validation rule or workflow or Process builder or trigger.
Please Suggest.
Thanks,
Chirag verma.
My requirement is when ever we enter Last_Month__c = June then we should able to enter Amount values upto June Month only. If we
try to enter July month to till December then that it should throw an error.
Note - There is a field called Starting_month__c so we enter a valuein that field for idea purpose when will be the starting month.
Last_Month__c is Picklist field and January , February, so on fields data type = 'Number'.
This sceniero is possible through validation rule or workflow or Process builder or trigger.
Please Suggest.
Thanks,
Chirag verma.
One question, do you have a seperate field for Amount for each month, if yes then what is its API Name?
January__c,February__c,March__c,April__c,May__c,June__c,July__c,August__c,September__c,October__c,November__c,December__c
Create a new Validation Rule
OR(
AND (ISPICKVAL(Last_Month__c,'1'),ISBLANK(January__c)),
AND (ISPICKVAL(Last_Month__c,'2'),OR (ISBLANK(January__c),ISBLANK(February__c))),
AND (ISPICKVAL(Last_Month__c,'3'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c))),
AND (ISPICKVAL(Last_Month__c,'4'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c))),
AND (ISPICKVAL(Last_Month__c,'5'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c))),
AND (ISPICKVAL(Last_Month__c,'6'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c),ISBLANK(June__c))),
AND (ISPICKVAL(Last_Month__c,'7'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c),ISBLANK(June__c),ISBLANK(July__c))),
AND (ISPICKVAL(Last_Month__c,'8'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c),ISBLANK(June__c),ISBLANK(July__c),ISBLANK(August__c))),
AND (ISPICKVAL(Last_Month__c,'9'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c),ISBLANK(June__c),ISBLANK(July__c),ISBLANK(August__c),ISBLANK(September__c))),
AND (ISPICKVAL(Last_Month__c,'10'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c),ISBLANK(June__c),ISBLANK(July__c),ISBLANK(August__c),ISBLANK(September__c),ISBLANK(October__c))),
AND (ISPICKVAL(Last_Month__c,'11'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c),ISBLANK(June__c),ISBLANK(July__c),ISBLANK(August__c),ISBLANK(September__c),ISBLANK(October__c),ISBLANK(November__c))),
AND (ISPICKVAL(Last_Month__c,'12'),OR (ISBLANK(January__c),ISBLANK(February__c),ISBLANK(March__c),ISBLANK(April__c),ISBLANK(May__c),ISBLANK(June__c),ISBLANK(July__c),ISBLANK(August__c),ISBLANK(September__c),ISBLANK(October__c),ISBLANK(November__c),ISBLANK(December__c)))
)
Mark this as best answer if it helped.
Thanks for reply, But it worked with the ISPICKVAL(Latest_Month__c,'Jan'), NOT( ISBLANK(January__c) ),
Anyways Thanks.!