How to send a News post with a count of IDs of new contacts added today?

Hi, 

This will be a simple feed which calculates the number of contacts we have added to the database today. It will look something like:

"Today we have added [Total number of contacts today]"

 

1. I have a Data Store, and a form that adds new contacts to it. 

2. I have a process model with a node that posts to feed.

3. (I'm unsure as to how to configure the node so that the calculations work and add it to the node) 

 

Please can you help with step 3? I'm unsure about the properties configuration and the query rule that I should use. You help would be much appreciated! 

Many thanks, 

Eric

  Discussion posts and replies are publicly visible

Parents
  • Hi, for your query, you can do a query to the table with the appropriate date filters and a paging info of (1,0). Then get the total count. It is important to have your paging info as (1,0), otherwise you will pull back data when all you need is the count

    a!queryEntity(
    entity: cons!YOUR_DATA_STORE,
    query: a!query(

    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 0
    )
    )
    ).totalCount

    Make sure to add a filter to only get ones for the appropriate date.
Reply
  • Hi, for your query, you can do a query to the table with the appropriate date filters and a paging info of (1,0). Then get the total count. It is important to have your paging info as (1,0), otherwise you will pull back data when all you need is the count

    a!queryEntity(
    entity: cons!YOUR_DATA_STORE,
    query: a!query(

    pagingInfo: a!pagingInfo(
    startIndex: 1,
    batchSize: 0
    )
    )
    ).totalCount

    Make sure to add a filter to only get ones for the appropriate date.
Children
No Data