I'm having difficulty determining the correct format to filter data in the a!exportDataStoreEntityToExcel function. I'm trying to export from a DSE but only want data in a particular date range. Can you provide an example?
Discussion posts and replies are publicly visible
Can you give us an example of what filtering you've already tried, and what's happening wrong (i.e. breaking, or just not getting the expected results, etc)?
Also: are you already familiar with writing query entity rules using a!queryEntity and, more importantly, a!queryFilter and a!queryLogicalExpression? If not, I suggest you start there since generally the same logic is used in these, but in a way that's far easier to test.
Mike,
I've been using and writing query entity rules for a long time. The Additional Details section for the function in Documentation doesn't show anything about how to construct the query inside exportDataStoreEntityToExcel but infers that it is possible.
Just a working example would be nice.
The help text that pops up when you click inside the rule seems pretty sufficient - the "filters" parameter takes a list of a!queryFilter or a single a!queryLogicalExpression (which itself can nest indefinitely further).
I was actually able to quickly write this example interface just now, and have even generated an example file and downloaded it to check:
a!sectionLayout( contents: { a!buttonArrayLayout( align: "START", buttons: { a!buttonWidget( label: "Click", saveInto: { a!exportDataStoreEntityToExcel( entity: cons!PROJECT_DSE_CATEGORY_TYPES, saveInFolder: cons!GLBL_DOC_UPLOAD_TEMP_DIRECTORY, documentName: "Export DSE to Excel Example", filters: a!queryLogicalExpression( operator: "AND", filters: { a!queryFilter( field: "ActiveFlg", operator: "=", value: true() ) /* add more filters here if/when needed */ } ) ) } ) } ) } )
Thanks, I was trying to put oo much into it.
*too much