function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
VSK98VSK98 

I have one Requirement , count the no . of records having Country having INDIA

Hi All,

I have one Account object, There are 100 Records in it, I have one field like Nation (Text Field), there are 90 records having INDIA in nation field,.....
Is it possible to count no .of records having INDIA in formula field,
This formula field need to use in reports..........


Any ideas let me share

Adv Thnx
Siv.

No relationship
DebasisDebasis
Hi VSK98,

you can use below query to count record from object
integer countRec = [select count() from Account where nation__c = 'INDIA'];

 
VSK98VSK98
Thnx For Ur Replied, But Is it Possible in Formual Field ??????????????????
DebasisDebasis
without using a rollup summary field (which requires a master-detail relationship) or an apex  you can't count  records with a standard formula field.
You can vote on somewhat similat idea on this 
https://success.salesforce.com/ideaView?id=08730000000aQHcAAM

you have to use apex/soql to take the count of records.