Zum Hauptinhalt wechseln
Adaptive Planning
Reference: Re-ordering Columns for Modeled and Cube Sheet Definition JSON APIs

Reference: Re-ordering Columns for Modeled and Cube Sheet Definition JSON APIs

Only available for
/definition
when query parameter
reorderColumns
is true.

Example Request

Request URI:
HTTPS://api.adaptiveplanning.com/api/rest/modeling/<version>/<tenant>/sheet/modeled/definition/?name=APIColumnsReorderTwo1660598383&reorderColumns=true
Request Body Create
Request Body Update
Expected Results
{ "properties": { "prefix": "APIColumnsReorderTwo1660598383" }, "columns": [ { "properties": { "name": "Level", "type": "LEVEL" } }, { "properties": { "name": "TextOne", "code": "TextOne", "type": "TEXT" } }, { "properties": { "name": "TextTwo", "code": "TextTwo", "type": "TEXT" } }, { "properties": { "name": "TextThree", "code": "TextThree", "type": "TEXT" } }, { "properties": { "name": "TextFour", "code": "TextFour", "type": "TEXT" } }, { "properties": { "name": "TextFive", "code": "TextFive", "type": "TEXT" } } ] }
{ "properties": { "prefix": "APIColumnsReorderTwo1660598383" }, "columns": [ { "properties": { "name": "TextFour", "code": "TextFour", "type": "TEXT" } }, { "properties": { "name": "TextSix", "code": "TextSix", "type": "TEXT" } }, { "properties": { "name": "TextThree", "code": "TextThree", "type": "TEXT" } }, { "properties": { "name": "TextSeven", "code": "TextSeven", "type": "TEXT" } }, { "properties": { "name": "TextEight", "code": "TextEight", "type": "TEXT" } }, { "properties": { "name": "TextOne", "code": "TextOne", "type": "TEXT" } } ] }
If
reorderColumns
was
false
, we would have expected this order after updating the column list:
  • Level
  • TextOne
  • TextTwo
  • TextThree
  • TextFour
  • TextFive
  • TextSix
  • TextSeven
  • TextEight
With
reorderColumns
set to
true
, we instead get this ordering:
  • Level
  • TextTwo
  • TextFour
  • TextSix
  • TextThree
  • TextSeven
  • TextEight
  • TextOne
  • TextFive
  • Re-ordering columns flag can be turned on when creating a new sheet, or updating an existing one.
  • Typically the re-ordering algorithm will prioritize the ordering of the columns in the API request. However, when there is ambiguity, or when dealing with columns that are not mentioned by the request, the algorithm will prioritize the ordering of the columns as they already existed on the sheet.
  • The re-ordering algorithm will move columns backward, rather than move them forward. If two columns swap places (C, B), in practice, the algorithm moves B after C, rather than move C before B. This matters when there are existing columns between B and C that aren't mentioned in the request