You need to sign in to do that
Don't have an account?
RMS IT
Make one or two field required when picklist value is selected.
Hello,
I have a scenario whereby when a user select a certain value from a picklist. He/She must fill up either one of two custom lookup fields.
Through google and lurking i am able to come up with the following... but i just can't get the syntax correct.
Appreciate any advice for my formula.
AND (
OR (
ISPICKVAL(Type__c, "R2R-2015"),
ISPICKVAL(Type__c, "R2R-2016"),
ISPICKVAL(Type__c, "R2R-2017")
),
LEN ( MIF_Contract__c ) < 1 OR LEN ( MIF_Profile__c ) < 1)
)
I have a scenario whereby when a user select a certain value from a picklist. He/She must fill up either one of two custom lookup fields.
Through google and lurking i am able to come up with the following... but i just can't get the syntax correct.
Appreciate any advice for my formula.
AND (
OR (
ISPICKVAL(Type__c, "R2R-2015"),
ISPICKVAL(Type__c, "R2R-2016"),
ISPICKVAL(Type__c, "R2R-2017")
),
LEN ( MIF_Contract__c ) < 1 OR LEN ( MIF_Profile__c ) < 1)
)
Then 2nd "OR" operator should be "AND", like this.
AND (
OR (
ISPICKVAL(Type__c, "R2R-2015"),
ISPICKVAL(Type__c, "R2R-2016"),
ISPICKVAL(Type__c, "R2R-2017")
),
AND(LEN ( MIF_Contract__c ) < 1, LEN ( MIF_Profile__c ) < 1)
)
Does it work?
All Answers
AND (
OR (
ISPICKVAL(Type__c, "R2R-2015"),
ISPICKVAL(Type__c, "R2R-2016"),
ISPICKVAL(Type__c, "R2R-2017")
),
OR(LEN ( MIF_Contract__c ) < 1, LEN ( MIF_Profile__c ) < 1)
)
thanks for the reply. I have tried your suggestion but it still only check the first condition LEN ( MIF_Contract__c ) < 1
i would like it that no error will return if either MIF_Contract__c or MIF_Profile__c is filled.
Regrads
Then 2nd "OR" operator should be "AND", like this.
AND (
OR (
ISPICKVAL(Type__c, "R2R-2015"),
ISPICKVAL(Type__c, "R2R-2016"),
ISPICKVAL(Type__c, "R2R-2017")
),
AND(LEN ( MIF_Contract__c ) < 1, LEN ( MIF_Profile__c ) < 1)
)
Does it work?
Thank You !
I hope you choose one of my comments as a best answer and make this question Solved.