Count of Chatter Posts

Rich,

You can use an aggregate model to count the chatter feeds for each Task and then show this count on a table of Tasks. On the row action, setup conditional rendering to only show the icon when the count of chatter feeds is greater than 0.

Here is an Account page sample that demonstrates this.

Thanks,

Bill


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Account">    <models>
        <model id="Account" limit="100" query="true" createrowifnonefound="false" adapter="salesforce" service="salesforce" sobject="Account" type="">
            <fields>
                <field id="Name"/>
                <field id="CreatedDate"/>
                <field id="Id"/>
                <field id="ChatterCount" uionly="true" displaytype="FORMULA" label="Chatter Count" readonly="true" returntype="DOUBLE" precision="3" scale="0">
                    <formula>MODEL_LOOKUP("AccountFeedCount","countId","parentId",{{Id}})</formula>
                </field>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="Messages" limit="20" query="true" createrowifnonefound="false" adapter="salesforce" service="salesforce" type="" sobject="ChatterMessage">
            <fields/>
            <conditions/>
            <actions/>
        </model>
        <model id="AccountFeedDrawer" limit="20" query="true" createrowifnonefound="false" adapter="salesforce" service="salesforce" type="" sobject="AccountFeed">
            <fields>
                <field id="ParentId"/>
                <field id="Parent.Name"/>
                <field id="Body"/>
                <field id="Title"/>
                <field id="RelatedRecordId"/>
            </fields>
            <conditions>
                <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="ParentId" state="filterableoff" inactive="true" name="ParentIdDrawer"/>
            </conditions>
            <actions/>
        </model>
        <model id="AccountFeed" limit="20" query="true" createrowifnonefound="false" adapter="salesforce" service="salesforce" type="" sobject="AccountFeed">
            <fields>
                <field id="ParentId"/>
                <field id="Parent.Name"/>
                <field id="Body"/>
                <field id="CreatedDate"/>
                <field id="LastModifiedDate"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="AccountFeedCount" limit="" query="true" createrowifnonefound="false" adapter="salesforce" service="salesforce" type="aggregate" sobject="AccountFeed">
            <fields>
                <field id="Id" name="countId" function="COUNT"/>
            </fields>
            <conditions/>
            <actions/>
            <groupby method="simple">
                <field id="ParentId" name="parentId"/>
                <field id="Parent.Name" name="parentName"/>
            </groupby>
        </model>
    </models>
    <components>
        <pagetitle model="Account" uniqueid="sk-3uKRot-80">
            <maintitle>
                <template>{{Model.labelPlural}}</template>
            </maintitle>
            <subtitle>
                <template>Home</template>
            </subtitle>
            <actions>
                <action type="savecancel"/>
            </actions>
        </pagetitle>
        <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Account" mode="read" uniqueid="sk-3uKRot-81">
            <fields>
                <field id="Name" allowordering="true" valuehalign="" type=""/>
                <field id="ChatterCount" decimalplaces="" valuehalign="" type=""/>
            </fields>
            <rowactions>
                <action type="edit"/>
                <action type="delete"/>
                <action type="drawer" label="Account Feed Drawer" icon="fa-arrow-down">
                    <drawer title="Drawer Area" width="90%" closehandle="true">
                        <components>
                            <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="AccountFeed" buttonposition="" mode="read" uniqueid="sk-3uMSZ7-314">
                                <fields>
                                    <field id="Body"/>
                                    <field id="LastModifiedDate"/>
                                </fields>
                                <rowactions>
                                    <action type="edit"/>
                                    <action type="delete"/>
                                </rowactions>
                                <massactions usefirstitemasdefault="true">
                                    <action type="massupdate"/>
                                    <action type="massdelete"/>
                                </massactions>
                                <views>
                                    <view type="standard"/>
                                </views>
                                <conditions>
                                    <condition type="contextrow" field="ParentId" mergefield="Id" operator="="/>
                                </conditions>
                            </skootable>
                        </components>
                        <beforeload>
                            <action type="setCondition" model="AccountFeedDrawer" condition="ParentIdDrawer" value="{{Id}}"/>
                            <action type="requeryModel" model="AccountFeedDrawer" behavior="standard"/>
                        </beforeload>
                    </drawer>
                    <renderconditions logictype="and">
                        <rendercondition type="fieldvalue" operator="gt" enclosevalueinquotes="false" fieldmodel="Account" sourcetype="fieldvalue" field="ChatterCount" value="0"/>
                    </renderconditions>
                </action>
            </rowactions>
            <massactions usefirstitemasdefault="true">
                <action type="massupdate"/>
                <action type="massdelete"/>
            </massactions>
            <views>
                <view type="standard"/>
            </views>
        </skootable>
    </components>
    <resources>
        <labels/>
        <css/>
        <javascript/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>