How to include property on exported excel file that's not on pxResults
Good day,
we are using the pxGenerateExcelFile activity to generate excel file that is filtered by a date range. However this activity only lets us include results included in the pxResults pagelist. anything in the primary page cannot be used. Or at least I haven't figured it out yet.
Expected look:
From 1/1/2023 to 1/20/2023
| Name | Date visited |
|---|---|
| Name1 | 1/1/2023 |
| Name2 | 1/7/2023 |
| Name3 | 1/15/2023 |
Implementation:
From {Primary.DateFrom} To {Primary.DateTo}
| Name | Date visited |
|---|---|
| {Primary.pxResults().Name} | {Primary.pxResults().DateVisited} |
How do we go about setting the date range for this?
EDIT:
we should use MSOGenerateExcelFile
@'Rickmany thanks for posting the solution, which was to use MSOGenerateExcelFile.
Our main documentation is here: Activities for integrating cases with Excel documents
MSOGenerateExcelFile sends out the ajax response to the UI (DOM / Browser) .This content on harness refresh is been changed and the content which is been received by UI is not been recognized that is why the operation may not work for multiple clicks. The Second time when you click on the button, it expects the new session to download the file.
When we implement open url in window, this action accepts all types of content and execute it properly irrespective of the content. In 7.x versions the content type strict mode is not been there and also templatized UI feature is also not present. But in 8.x version UI is templatized and the data rendering on to the UI has been changed( server sending xml data and in client side adding html tags and then rendering in UI) . Due to which it is working fine in 7.x and not working in 8.x.
Please be sure to reference a good Developer Knowledge Share discussion: How to use MSOParseExcelFile and MSOGenerateExcelFile