You need to sign in to do that
Don't have an account?
Data Science 3
Sorting columns in reports using a Python API
Hello!
I'm using a slightly modified version of the python salesforce_reporting package to download reports from salesforce. The modification is to the script involves editing the json reporting metadata passed to the post request by adding an extra field "sortBy": [<api col name>, "Asc"] or "Desc" in accordance to https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/sforce_analytics_rest_api_report_query.htm. However this is not working and I'm wondering if anyone has had success. I've tried variation of "Asc", "asc", "ASCENDING" but none of them work and it is not clear from the webpage what the correct thing to do is. Thanks!
I'm using a slightly modified version of the python salesforce_reporting package to download reports from salesforce. The modification is to the script involves editing the json reporting metadata passed to the post request by adding an extra field "sortBy": [<api col name>, "Asc"] or "Desc" in accordance to https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/sforce_analytics_rest_api_report_query.htm. However this is not working and I'm wondering if anyone has had success. I've tried variation of "Asc", "asc", "ASCENDING" but none of them work and it is not clear from the webpage what the correct thing to do is. Thanks!
Try to use "sortOrder": "Desc", after SortBy.
Please mark it as solved if my reply was helpful. It will make it available for other as the proper solution.
Best Regards
Sandhya