Error in a formula field
Clash Royale CLAN TAG#URR8PPP
I have a requirement where I need to populate records where a criteria is true.
The criteria is the users must have joined in between Jul,2018 to May,2019.
I thought I can achieve this using a formula field. Below is the formula:
AND((Join_Date__c >= DATE(2018,07,01)),(Join_Date__c <= DATE(2019,04,30)))
this would return true if both the conditions satisy.
But when I see in the record, it is displayed as "#Error!" instead of true or false
I do not understand where I have done a mistake. Can anyone please help me with this.
controller formula-field custom-field
add a comment |
I have a requirement where I need to populate records where a criteria is true.
The criteria is the users must have joined in between Jul,2018 to May,2019.
I thought I can achieve this using a formula field. Below is the formula:
AND((Join_Date__c >= DATE(2018,07,01)),(Join_Date__c <= DATE(2019,04,30)))
this would return true if both the conditions satisy.
But when I see in the record, it is displayed as "#Error!" instead of true or false
I do not understand where I have done a mistake. Can anyone please help me with this.
controller formula-field custom-field
Do you want to displaytrue
in the formula field if joining date falls in your criteria, andfalse
otherwise. Is it?
– sfdc_sk
Mar 1 at 8:19
Yes @sfdc_sk...True and false in the sense, check or uncheck
– S kanth
Mar 1 at 8:21
What datatype are you using for this formula field?
– rahul gawale
Mar 1 at 8:27
@rahulgawale return data type is checkbox
– S kanth
Mar 1 at 8:30
add a comment |
I have a requirement where I need to populate records where a criteria is true.
The criteria is the users must have joined in between Jul,2018 to May,2019.
I thought I can achieve this using a formula field. Below is the formula:
AND((Join_Date__c >= DATE(2018,07,01)),(Join_Date__c <= DATE(2019,04,30)))
this would return true if both the conditions satisy.
But when I see in the record, it is displayed as "#Error!" instead of true or false
I do not understand where I have done a mistake. Can anyone please help me with this.
controller formula-field custom-field
I have a requirement where I need to populate records where a criteria is true.
The criteria is the users must have joined in between Jul,2018 to May,2019.
I thought I can achieve this using a formula field. Below is the formula:
AND((Join_Date__c >= DATE(2018,07,01)),(Join_Date__c <= DATE(2019,04,30)))
this would return true if both the conditions satisy.
But when I see in the record, it is displayed as "#Error!" instead of true or false
I do not understand where I have done a mistake. Can anyone please help me with this.
controller formula-field custom-field
controller formula-field custom-field
edited Mar 1 at 9:20
S kanth
asked Mar 1 at 7:37
S kanthS kanth
326
326
Do you want to displaytrue
in the formula field if joining date falls in your criteria, andfalse
otherwise. Is it?
– sfdc_sk
Mar 1 at 8:19
Yes @sfdc_sk...True and false in the sense, check or uncheck
– S kanth
Mar 1 at 8:21
What datatype are you using for this formula field?
– rahul gawale
Mar 1 at 8:27
@rahulgawale return data type is checkbox
– S kanth
Mar 1 at 8:30
add a comment |
Do you want to displaytrue
in the formula field if joining date falls in your criteria, andfalse
otherwise. Is it?
– sfdc_sk
Mar 1 at 8:19
Yes @sfdc_sk...True and false in the sense, check or uncheck
– S kanth
Mar 1 at 8:21
What datatype are you using for this formula field?
– rahul gawale
Mar 1 at 8:27
@rahulgawale return data type is checkbox
– S kanth
Mar 1 at 8:30
Do you want to display
true
in the formula field if joining date falls in your criteria, and false
otherwise. Is it?– sfdc_sk
Mar 1 at 8:19
Do you want to display
true
in the formula field if joining date falls in your criteria, and false
otherwise. Is it?– sfdc_sk
Mar 1 at 8:19
Yes @sfdc_sk...True and false in the sense, check or uncheck
– S kanth
Mar 1 at 8:21
Yes @sfdc_sk...True and false in the sense, check or uncheck
– S kanth
Mar 1 at 8:21
What datatype are you using for this formula field?
– rahul gawale
Mar 1 at 8:27
What datatype are you using for this formula field?
– rahul gawale
Mar 1 at 8:27
@rahulgawale return data type is checkbox
– S kanth
Mar 1 at 8:30
@rahulgawale return data type is checkbox
– S kanth
Mar 1 at 8:30
add a comment |
1 Answer
1
active
oldest
votes
Use this formula.
IF( AND( Join_Date__c >= DATE(2018,07,01), Join_Date__c <= DATE(2019,04,30) ), true, false )
The mistake in your formula is April doesnt have 31 days
DATE(2019,04,31) is not correct
Thanks for your concern over this issue....I tried using your formula. It also returned error as value in the field
– S kanth
Mar 1 at 9:01
Then probably you will have to check FLS for the field named Join_Date__c
– Junaid P Khader
Mar 1 at 9:06
It is set to visible for all the profiles and being a system admin, atleast, I would have access to all fields. Even in the field accessibility, it is set to editable for system admin profile
– S kanth
Mar 1 at 9:09
I have modified the formula in the answer. Try that!
– Junaid P Khader
Mar 1 at 9:26
1
In your formula, you are using the 31st day of April in the second condition. However April has only 30 days. That was the problem.
– Junaid P Khader
Mar 1 at 9:34
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "459"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f252173%2ferror-in-a-formula-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Use this formula.
IF( AND( Join_Date__c >= DATE(2018,07,01), Join_Date__c <= DATE(2019,04,30) ), true, false )
The mistake in your formula is April doesnt have 31 days
DATE(2019,04,31) is not correct
Thanks for your concern over this issue....I tried using your formula. It also returned error as value in the field
– S kanth
Mar 1 at 9:01
Then probably you will have to check FLS for the field named Join_Date__c
– Junaid P Khader
Mar 1 at 9:06
It is set to visible for all the profiles and being a system admin, atleast, I would have access to all fields. Even in the field accessibility, it is set to editable for system admin profile
– S kanth
Mar 1 at 9:09
I have modified the formula in the answer. Try that!
– Junaid P Khader
Mar 1 at 9:26
1
In your formula, you are using the 31st day of April in the second condition. However April has only 30 days. That was the problem.
– Junaid P Khader
Mar 1 at 9:34
add a comment |
Use this formula.
IF( AND( Join_Date__c >= DATE(2018,07,01), Join_Date__c <= DATE(2019,04,30) ), true, false )
The mistake in your formula is April doesnt have 31 days
DATE(2019,04,31) is not correct
Thanks for your concern over this issue....I tried using your formula. It also returned error as value in the field
– S kanth
Mar 1 at 9:01
Then probably you will have to check FLS for the field named Join_Date__c
– Junaid P Khader
Mar 1 at 9:06
It is set to visible for all the profiles and being a system admin, atleast, I would have access to all fields. Even in the field accessibility, it is set to editable for system admin profile
– S kanth
Mar 1 at 9:09
I have modified the formula in the answer. Try that!
– Junaid P Khader
Mar 1 at 9:26
1
In your formula, you are using the 31st day of April in the second condition. However April has only 30 days. That was the problem.
– Junaid P Khader
Mar 1 at 9:34
add a comment |
Use this formula.
IF( AND( Join_Date__c >= DATE(2018,07,01), Join_Date__c <= DATE(2019,04,30) ), true, false )
The mistake in your formula is April doesnt have 31 days
DATE(2019,04,31) is not correct
Use this formula.
IF( AND( Join_Date__c >= DATE(2018,07,01), Join_Date__c <= DATE(2019,04,30) ), true, false )
The mistake in your formula is April doesnt have 31 days
DATE(2019,04,31) is not correct
edited Mar 1 at 9:34
answered Mar 1 at 8:53
Junaid P KhaderJunaid P Khader
1,181313
1,181313
Thanks for your concern over this issue....I tried using your formula. It also returned error as value in the field
– S kanth
Mar 1 at 9:01
Then probably you will have to check FLS for the field named Join_Date__c
– Junaid P Khader
Mar 1 at 9:06
It is set to visible for all the profiles and being a system admin, atleast, I would have access to all fields. Even in the field accessibility, it is set to editable for system admin profile
– S kanth
Mar 1 at 9:09
I have modified the formula in the answer. Try that!
– Junaid P Khader
Mar 1 at 9:26
1
In your formula, you are using the 31st day of April in the second condition. However April has only 30 days. That was the problem.
– Junaid P Khader
Mar 1 at 9:34
add a comment |
Thanks for your concern over this issue....I tried using your formula. It also returned error as value in the field
– S kanth
Mar 1 at 9:01
Then probably you will have to check FLS for the field named Join_Date__c
– Junaid P Khader
Mar 1 at 9:06
It is set to visible for all the profiles and being a system admin, atleast, I would have access to all fields. Even in the field accessibility, it is set to editable for system admin profile
– S kanth
Mar 1 at 9:09
I have modified the formula in the answer. Try that!
– Junaid P Khader
Mar 1 at 9:26
1
In your formula, you are using the 31st day of April in the second condition. However April has only 30 days. That was the problem.
– Junaid P Khader
Mar 1 at 9:34
Thanks for your concern over this issue....I tried using your formula. It also returned error as value in the field
– S kanth
Mar 1 at 9:01
Thanks for your concern over this issue....I tried using your formula. It also returned error as value in the field
– S kanth
Mar 1 at 9:01
Then probably you will have to check FLS for the field named Join_Date__c
– Junaid P Khader
Mar 1 at 9:06
Then probably you will have to check FLS for the field named Join_Date__c
– Junaid P Khader
Mar 1 at 9:06
It is set to visible for all the profiles and being a system admin, atleast, I would have access to all fields. Even in the field accessibility, it is set to editable for system admin profile
– S kanth
Mar 1 at 9:09
It is set to visible for all the profiles and being a system admin, atleast, I would have access to all fields. Even in the field accessibility, it is set to editable for system admin profile
– S kanth
Mar 1 at 9:09
I have modified the formula in the answer. Try that!
– Junaid P Khader
Mar 1 at 9:26
I have modified the formula in the answer. Try that!
– Junaid P Khader
Mar 1 at 9:26
1
1
In your formula, you are using the 31st day of April in the second condition. However April has only 30 days. That was the problem.
– Junaid P Khader
Mar 1 at 9:34
In your formula, you are using the 31st day of April in the second condition. However April has only 30 days. That was the problem.
– Junaid P Khader
Mar 1 at 9:34
add a comment |
Thanks for contributing an answer to Salesforce Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f252173%2ferror-in-a-formula-field%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Do you want to display
true
in the formula field if joining date falls in your criteria, andfalse
otherwise. Is it?– sfdc_sk
Mar 1 at 8:19
Yes @sfdc_sk...True and false in the sense, check or uncheck
– S kanth
Mar 1 at 8:21
What datatype are you using for this formula field?
– rahul gawale
Mar 1 at 8:27
@rahulgawale return data type is checkbox
– S kanth
Mar 1 at 8:30