Home › Forums › The XBRL API › Sorting on a field that is not returned
- This topic has 2 replies, 2 voices, and was last updated 7 years, 10 months ago by Peter Guldberg.
-
AuthorPosts
-
-
Thursday, December 20, 2018 at 10:31 AM #118958Peter GuldbergParticipant
It used to be possible to sort on a field that was not returned, for example like this:
but that no longer seems to be working. If I move the report.id into the fields list it works fine, but then it also gets returned in the query.
-
Thursday, December 20, 2018 at 12:05 PM #118963David TaurielloKeymaster
I checked with team and there haven’t been any changes that would impact
.sort, which is applied on returned fields per the documentation:Any value returned can be sorted in ascending or descending order, by adding an additional property to a field value.
Maybe the sort is on one of the
periodfields in the query you posted – ? the BS Compare template uses this:https://api.xbrl.us/api/v1/fact/search?report.id=22860,22861,22862&fact.ultimus=1&concept.local-name=DocumentPeriodEndDate&fact.has-dimensions=false&fields=period.fiscal-period,period.fiscal-year,report.id.sort(DESC) -
Thursday, December 20, 2018 at 4:59 PM #118982Peter GuldbergParticipant
All right – maybe it was never meant to work. Basically, the query I posted definitely used to work, but now it doesn’t. However, it’s entirely possible that it was never meant to work.
I think my question here really is: Is there a way to sort the returned fields on a field that is not itself returned?
I agree that the documentation would seem to indicate that you can only sort on fields that are actually returned.
-
-
AuthorPosts
- You must be logged in to reply to this topic.
Search Forums
Recent Topics
Recent Replies
-
Getting started with the XBRL Google Sheet and add-on 3 weeks, 1 day ago
-
Income Statement data for a company 1 year, 4 months ago
-
Income Statement data for a company 1 year, 4 months ago
-
Using the offset parameter 1 year, 8 months ago
-
Using the offset parameter 1 year, 8 months ago
Documentation & Discussion
- Get started with Google Sheets OR
- Get started with Microsoft Excel OR
- Get access to as-filed data from us for other tools or your own app
- XBRL API Interactive Documentation
- Ten Tips & Techniques
- The XBRL API
- XBRL Data Community
- 2026 US GAAP Taxonomy Viewer
- Live support - Monday, 3:30 - 4:30 PM ET
Who's using this free data?
API Use 2026 || API Use 2025 || API Use 2024 || API Use 2023 || API Use 2022 || API Use 2021 || API Use 2020 || API Use 2019 || API Use 2018
Join XBRL US
- Individual Options - Basic, Power User & Sole Practitioner
- For Your Team - Startup, Non-Profit, Academic & Corporate options
- Member Benefits Comparison Table
Using the XBRL API with the Public Filings Database
Unless otherwise agreed to in writing, any and all use of the XBRL API to authenticate and retrieve data from the XBRL US Database of Public Filings implies user consent and agreement with the XBRL US API Agreement. If you are unable to agree to these terms, do not use the XBRL API.
To use the XBRL API outside of Google Sheets, your account needs to be provisioned for OAuth2 access.





