Announcement

Collapse
No announcement yet.

Formula - record\count('Lead', 'status=', list('Assigned', 'In Process'))

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Formula - record\count('Lead', 'status=', list('Assigned', 'In Process'))

    I have custom entity Projects and project Tasks, ( Relationship: project One-to-Many projectTasks)
    I have to count the number of tasks for a particular project.
    i created 2 projects and assigned 2 tasks each. I created task count field (type: varchar) and used the count function

    taskCount=record\count('ProjectTask', 'status=', list('Not Started', 'Started', 'Ongoing', 'Planned'));

    it is displaying all 4 project tasks irrespective of projects, expected 2 tasks.

    Also only the status filter is fetching the project tasks.

    taskCount=record\count('ProjectTask', projectId );

    Any help

  • #2

    entity\countRelated(LINK, [FILTER])
    entity\countRelated('opportunities', 'open')

    i think entity\countRelated('opportunities', ['open','Started' ]) can work .. to try.

    for LINK, go entity manager for have the name of relation

    Comment


    • cdmindya
      cdmindya commented
      Editing a comment
      Thanks, it's working without a filter.

      taskCount=entity\countRelated('projectTasks')
Working...
X