I have an odd problem. I have a read only grid what shows a value one way on the interface, but differently in the excel download.
Here is what you see in the interface vs the excel spreadsheet.
Here is the offending code in the Grid.
a!gridColumn( label: "Residential Status", value: rule!CMS_GetCurrentResidentialStatusId(fv!row['recordType!CMS Clergy Member Status Report.fields.clergyId']) ),
Here is the expression rule.
a!localVariables( /* * Get list of current resendential type addresses for clergy member * ordered by start date */ local!residentialAddressData: a!queryEntity( entity: cons!CMS_ADDRESS_CLERGY_ASSIGNED_ADDRESS, query: a!query( selection: a!querySelection( columns: { a!queryColumn( field: "clergyAddress.residentialStatus.status" ) } ), logicalExpression: a!queryLogicalExpression( operator: "AND", logicalExpressions: { a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "clergyId", operator: "=", value: ri!clergyMemberId ), a!queryFilter( field: "clergyAddress.addressType.addressType", operator: "in", value: { "Home", "Rectory" } ), a!queryFilter( field: "clergyAddressStart", operator: "<=", value: todate(now()) ) } ), a!queryLogicalExpression( operator: "OR", filters: { a!queryFilter( field: "clergyAddressEnd", operator: "is null" ), a!queryFilter( field: "clergyAddressEnd", operator: ">", value: todate(now()) ) } ) } ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: - 1, sort: a!sortInfo( field: "clergyAddressStart", ascending: false ) ) ) ).data, if( count(local!residentialAddressData) > 0, local!residentialAddressData[1].clergyAddress.residentialStatus.status, null ) )
Here is what the expression rule returns.
Discussion posts and replies are publicly visible
What method are you using to generate the Excel? What is the configuration?
I'm using the built in export function. That part of the grid, "showExportButton: true".
Your grid column is using a rule to (presumably) look up and display the text value for the ID being returned by your data set. I don't think this is expected to be automatically handled in the "export" functionality just because it's configured in an on-form grid column. (I have barely used the built-in "export grid" button for this and other reasons, so I'm fuzzy on what hacks may or may not be available to us here.)
Are you not able to create a plaintext Record column based on the relationship with whatever table contains the values tied to those IDs?
The issue is that the application is a mixture of CDT and RT tables. The data I need is in a CDT and the table I am using in the grid is a RT. I didn't want to create another record type in the application, but I guess I will have to.
That may be the only way if you expect the built-in excel export button to work and resolve the value correctly for your column. Though if you're really good at defining a custom column, I'd suggest that might be worth trying for a little bit first (i always forget whether or not we can make a custom column do something as elegant as querying a value, but I'd at least try before ruling it out. sorry if i'm flat wrong on this though... edit: i think i was actually wrong, you probably just need to set up a record type for it).