Skip to main content

I’ve been trying to use chart point data in the Branch Action of Chart Series action to dynamically set conditions and query. I can’t seem to get Branch to work at all in a Chart series for that matter.


I created a OppsBySource page to demonstrate. Tried both a formula field on the model and the same formula in the formula section in the branch itself. I’ve also tried “1 == 1”, true, “true”, TRUE, “TRUE”, 1, etc… nothing works. 😦


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
<models>
<model id="OppsByIndustry" limit="" query="true" createrowifnonefound="false" datasource="salesforce" type="aggregate" sobject="Opportunity">
<fields>
<field id="Id" name="countId" function="COUNT"/>
<field id="morethan2" uionly="true" displaytype="FORMULA" ogdisplaytype="TEXT" readonly="true" returntype="BOOLEAN" label="morethan2">
<formula>{{countId}} &amp;gt; 2</formula>
</field>
</fields>
<conditions/>
<actions/>
<groupby method="simple">
<field id="Account.Industry" name="accountIndustry"/>
</groupby>
</model>
</models>
<components>
<skuidvis__chart model="OppsByIndustry" maintitle="{{Model.labelPlural}}" type="column" uniqueid="sk-1WiBGt-112">
<dataaxes>
<axis id="axis1"/>
</dataaxes>
<categoryaxes>
<axis id="categories" categorytype="field" field="accountIndustry"/>
</categoryaxes>
<serieslist>
<series valuefield="countId" splittype="none" splitfield="leadSource">
<actions>
<action type="branch" model="OppsByIndustry">
<conditions>
<condition type="contextrows" field="Id" mergefield="Id" operator="in" autocreated="true"/>
</conditions>
<iftrueactions>
<action type="blockUI" message="There are more than 2 Opps for Industry {{$Chart.point.Name}} - {{$Chart.point.y}}" timeout="2000"/>
</iftrueactions>
<formula>{{morethan2}}</formula>
</action>
<action type="blockUI" message="There are 2 or less Opps for Industry {{$Chart.point.Name}} - {{$Chart.point.y}}" timeout="2000">
<conditions>
<condition type="contextrows" field="Id" mergefield="Id" operator="in" autocreated="true"/>
</conditions>
</action>
</actions>
</series>
</serieslist>
<colors/>
<legend layout="horizontal" halign="center" valign="bottom"/>
</skuidvis__chart>
</components>
<resources>
<labels/>
<javascript/>
<css/>
</resources>
<styles>
<styleitem type="background" bgtype="none"/>
</styles>
</skuidpage>


Hi, Pat. It looks like you found a bug in the Branch Action. I’ve got it logged and we’ll get it patched in a future iteration of Brooklyn. The issue is that the extra $Chart variables are ignored in the branch action. Once we get the issue patched, you should be able to access the value that you want via the $Chart.point.y variable within the branch formula.


Hi Skuid Community~

Thank you for your patience as we addressed this bug. This issue has been resolved in the Brooklyn Iteration 3 release which is now available from the Skuid Releases page.

As a reminder, Salesforce does NOT allow reverting back to prior versions of managed packages. Skuid always recommends installing new versions in a non-business critical sandbox environment to test all mission critical functionality before installing into a production environment. We also recommend that you update out of date themes when you upgrade.

Thanks!

-Skuid Support (SS)