Skip to content

Two-argument expressions: no spaces allowed, and brackets needed in GET - #94

Open
BjarteMell wants to merge 1 commit into
mainfrom
BjarteMell-patch-6
Open

BjarteMell wants to merge 1 commit into
mainfrom
BjarteMell-patch-6

Conversation

@BjarteMell

Copy link
Copy Markdown
Contributor

The space breaks the expression in both GET and POST. Tested on SSB 07459. SCB TAB6471 behaves the same: [top(2, 1)] gives 400 and [top(2,1)] gives 200. Spaces in a plain list are fine (valueCodes[Tid]=2024, 2025 works), so only spaces inside an expression fail.

In a GET URL, an expression containing a comma must be wrapped in square brackets**, because a bare comma is the list separator. The guide hints at this in lines 924–926, but the sentence is incomplete:

If the value code should be surrounded by square brackets like 3,[1,2],4+5.

The space breaks the expression in both GET and POST. Tested on SSB 07459. SCB TAB6471 behaves the same: `[top(2, 1)]` gives 400 and `[top(2,1)]` gives 200. Spaces in a plain list are fine (`valueCodes[Tid]=2024, 2025` works), so only spaces inside an expression fail.

In a GET URL, an expression containing a comma must be wrapped in square brackets**, because a bare comma is the list separator. The guide hints at this in lines 924–926, but the sentence is incomplete:

> If the value code should be surrounded by square brackets like `3,[1,2],4+5`.
@BjarteMell
BjarteMell requested review from a team as code owners October 13, 2026 13:58
You need to specify value codes for each variable that is not eliminable. The
value codes are given in a comma separated list. If the value code should be
surrounded by square brackets like `3,[1,2],4+5`. See bellow on how to specify
value codes are given in a comma separated list. If a value code or a selection expression contains a comma, wrap it in square brackets, e.g. `valueCodes[Tid]=[range(2002,2005)]` or `[top(5,1)]`. In a POST body, write the expression without brackets: `"range(2002,2005)"`. A bracketed string in POST is looked up as a value code and fails with `Non-existent value`. See bellow on how to specify

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a workarroud for a bug. Wrapping with [] does not make sense to me 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be clear these look wrong

  • [range(2002,2005)]
  • [top(5,1)]


```sh
bottom(numberOfValues, offset)
bottom(numberOfValues,offset)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removing spaces for the examples are good, but this also sounds like at bug we should fix in the API

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants