budibase icon indicating copy to clipboard operation
budibase copied to clipboard

Table using an external database with a formula column as the primaryDisplay show it on the far right instead of respecting the order of the dataview.

Open ConorWebb96 opened this issue 2 months ago • 1 comments

Checklist

  • [X] I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker compose
    • Budibase Version: 2.27.5
    • App Version: 2.27.5

Describe the bug This issue only appears if the table component is linked to a dataprovider as its source. If you directly reference the table the order will be correctly reflected.

To Reproduce Steps to reproduce the behavior:

  1. Import app attached below.
  2. Use the table create script attached below to create the database.
  3. Fetch the tables in Budibase
  4. Add a formula column, doesn't matter what its called.
  5. Set the formula column to be the primaryDisplay column.
  6. Create a new screen that has a dataprovider linked to the newly created table.
  7. Add a table component nested inside the data provider, make sure the table is using the data provider as the source of its info.
  8. See the error, if the formula is the primary display it will go to the far right of the screen instead of being the first column.

Expected behavior primaryDisplay should always be the first column shown in the table.

Screenshots

Screenshot 2024-05-31 at 10 37 59

Screenshot 2024-05-31 at 10 38 16

App Export formula-column-primary-display.enc.tar.gz

CREATE TABLE "public"."users" (
    "id" varchar(10) NOT NULL DEFAULT ('us-'::text || lpad((nextval('user_id_seq'::regclass))::text, 5, '0'::text)),
    "name" varchar(100),
    "created_at" timestamp DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY ("id")
);

ConorWebb96 avatar May 31 '24 09:05 ConorWebb96