Potential bug with merge syntax in split template when applying filter

  • 1
  • Problem
  • Updated 1 year ago
  • In Progress
Watch the video below, but in a nutshell, I'm using merge syntax in the split template to display the labels. When I apply a filter to the model, the merge syntax is dropped.

This is on Skuid Platform.

Photo of Andrew N

Andrew N

  • 1,178 Points 1k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Andrew N

Andrew N

  • 1,178 Points 1k badge 2x thumb
Here's some sample code to recreate the issue:

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
	<models>
		<model id="Opportunity" query="true" createrowifnonefound="false" datasource="Salesforce" processonclient="true" type="aggregate" sobject="Opportunity" limit="">
			<fields>
				<field id="Id" name="countId" function="COUNT" accessible="true" createable="false" editable="false" filterable="true" groupable="true" sortable="true" displaytype="ID" label="Opportunity ID"/>
			</fields>
			<conditions>
				<condition type="multiple" field="ForecastCategory" operator="in" inactive="true" enclosevalueinquotes="true" name="__autofilter__ForecastCategory" state="filterableoff" value=""/>
				<condition type="multiple" field="Type" operator="in" inactive="true" enclosevalueinquotes="true" name="__autofilter__Type" state="filterableoff" value=""/>
			</conditions>
			<actions/>
			<groupby method="simple">
				<field id="Type" name="type" accessible="true" createable="true" editable="true" filterable="true" groupable="true" sortable="true" length="40" displaytype="PICKLIST" label="Opportunity Type"/>
				<field id="ForecastCategory" name="forecastCategory" accessible="true" createable="false" editable="false" filterable="true" groupable="true" sortable="true" length="40" displaytype="PICKLIST" label="Forecast Category"/>
			</groupby>
		</model>
	</models>
	<components>
		<filterset model="Opportunity" searchmethod="server" searchbox="true" uniqueid="sk-2ousTI-342" position="right">
			<filters>
				<filter type="multiselect" filteroffoptionlabel="All Forecast Categories" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="auto" labelmode="auto" filtermethod="server" conditionfield="ForecastCategory" conditionoperator="in"/>
				<filter type="multiselect" filteroffoptionlabel="All Types" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="auto" labelmode="auto" filtermethod="server" conditionfield="Type" conditionoperator="in"/>
			</filters>
		</filterset>
		<skuidvis__chart model="Opportunity" maintitle="Opportunities" type="pie" uniqueid="sk-2ouJeH-244">
			<dataaxes>
				<axis id="axis1"/>
			</dataaxes>
			<categoryaxes>
				<axis id="categories" categorytype="field"/>
			</categoryaxes>
			<serieslist>
				<series valuefield="countId" splittype="template" modelId="Opportunity" aggfunction="sum" splittemplate="{{{type}}} - {{{forecastCategory}}}"/>
			</serieslist>
			<colors/>
			<legend layout="horizontal" halign="center" valign="bottom"/>
		</skuidvis__chart>
	</components>
	<resources>
		<labels/>
		<javascript/>
		<css/>
		<actionsequences uniqueid="sk-2ouD5S-232"/>
	</resources>
	<styles>
		<styleitem type="background" bgtype="none"/>
	</styles>
</skuidpage>

Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Does this work for you?

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="false">    <models>
        <model id="oppty2" limit="" query="true" createrowifnonefound="false" datasource="salesforce" type="aggregate" sobject="Opportunity">
            <fields>
                <field id="Id" name="countId" function="COUNT"/>
            </fields>
            <conditions>
                <condition type="multiple" field="ForecastCategory" operator="in" inactive="true" enclosevalueinquotes="true" name="__autofilter__ForecastCategory" state="filterableoff" value=""/>
                <condition type="multiple" field="Type" operator="in" inactive="true" enclosevalueinquotes="true" name="__autofilter__Type" state="filterableoff" value=""/>
            </conditions>
            <actions/>
            <groupby method="simple">
                <field id="Type" name="type"/>
                <field id="ForecastCategory" name="forecastCategory"/>
            </groupby>
        </model>
    </models>
    <components>
        <filterset model="oppty2" searchmethod="server" searchbox="true" uniqueid="sk-2xz6R9-269">
            <filters>
                <filter type="multiselect" filteroffoptionlabel="All Forecast Categories" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="auto" labelmode="no" conditionfield="ForecastCategory" conditionoperator="in"/>
                <filter type="multiselect" filteroffoptionlabel="All Types" createfilteroffoption="true" affectcookies="true" autocompthreshold="25" conditionsource="auto" labelmode="no" conditionfield="Type" conditionoperator="in"/>
            </filters>
        </filterset>
        <skuidvis__chart model="oppty2" maintitle="Opportunities 2" type="pie" uniqueid="sk-2xyUmM-199">
            <dataaxes>
                <axis id="axis1"/>
            </dataaxes>
            <categoryaxes>
                <axis id="categories" categorytype="field"/>
            </categoryaxes>
            <serieslist>
                <series valuefield="countId" splittype="template" modelId="oppty2" aggfunction="count" splittemplate="{{{type}}} - {{{forecastCategory}}}" type=""/>
            </serieslist>
            <colors/>
            <legend layout="horizontal" halign="center" valign="bottom"/>
        </skuidvis__chart>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
        <actionsequences uniqueid="sk-2ouD5S-232"/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>
Photo of Andrew N

Andrew N

  • 1,178 Points 1k badge 2x thumb
No, experiencing the same behavior.

Thanks for looking into this,
Andrew