Agg Model with Grouped Date field w/ UTC can't be grouped with same field V2 16.0.3

Un-checking this option resolves the issue.

<skuid__page unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" showheader="false">
	<models>
		<model id="GroupedDateTimeDayOnlyUTC" limit="" query="true" createrowifnonefound="false" datasource="salesforce" sobject="skuid__Page_Version__c" type="aggregate" queryallrows="false" orderby="DAY_ONLY(CreatedDate) DESC">
			<fields>
				<field id="Id" name="countId" function="COUNT"/>
			</fields>
			<conditions/>
			<actions/>
			<groupby method="simple">
				<field id="CreatedDate" name="doCreatedDate" function="DAY_ONLY" convertToUserTimezone="true"/>
			</groupby>
		</model>
	</models>
	<components>
		<skuid__wrapper uniqueid="sk-H6T-245359">
			<components>
				<skuid__table allowColumnFreezing="dragDrop" model="GroupedDateTimeDayOnlyUTC" uniqueid="sk-H4l-52132" mode="readonly" showSaveCancel="false" pageSize="10" enableDrawers="false" title="Revisions">
					<fields>
						<field id="CreatedDate" name="doCreatedDate" label="Created Date" uniqueid="fi-H5b-73131"/>
						<field id="Id" name="countId" label="Revisions" uniqueid="sk-H4l-52133"/>
					</fields>
					<filtering enableSearch="false"/>
					<actions displayType="attached"/>
					<rowActions/>
					<massActions/>
					<exportProperties useTableColumns="true" sanitizeRecords="true"/>
					<sorting enable="false"/>
					<renderConditions logictype="and"/>
					<styleVariantConditions/>
					<filters/>
					<styles>
						<spacing/>
					</styles>
				</skuid__table>
			</components>
			<styles>
				<spacing top="2" right="2" bottom="2" left="2"/>
			</styles>
			<background/>
		</skuid__wrapper>
	</components>
	<resources>
		<labels/>
		<javascript/>
		<css/>
		<actionsequences/>
	</resources>
	<styles>
		<styleitem type="background" bgtype="none"/>
	</styles>
</skuid__page>

Hey Pat, try DAY_ONLY(convertTimezone(CreatedDate))

Sometimes to get the correct name for grouping fields for an aggregate model, it helps to run skuid.debug.modelMap() in the console and find out what the field is called in the SQL

TemplateFields.xml (1.2 KB)

1 Like