Skip to main content

Sending an empty array to clear a file column?

  • June 27, 2024
  • 7 replies
  • 128 views

dvdsmpsn
Forum|alt.badge.img+1

Similar to Bug fix: Sending an empty array to clear a dropdown column from @rachelatmonday, I thought I’d try to manipuate some file columns.

Using the following mutation:

mutation (
    $board_id: ID!
    $item_id: ID!
    $column_values: JSON!
) {
  change_multiple_column_values(
    board_id: $board_id
    item_id: $item_id
    column_values: $column_values
  ){
    id
  }
}

With the following variables:

{
  "board_id": 1540573903,
  "item_id": 1540573945,
  "column_values": "{\\"files__1\\":[],\\"files_1__1\\":[]}"
}

This returns a success & empties the files columns in the UI, but if you reload the page, the files return.

🙋‍♀️ Whats happening?


Here’s a Loom demo:

7 replies

dvdsmpsn
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • June 27, 2024

Ok, there’s documentation on clearing columns of type file:

monday.com Platform API

hat tip: @anon29275264

Still seems a bit odd that an empty array will change the files in the UI, even momentarily.


  • Participating Frequently
  • June 27, 2024

@dvdsmpsn would you do a test in the “cleared but not cleared” state and drag a file into the column and see what happens?


dvdsmpsn
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • June 27, 2024

@anon29275264 If you drop a file into the column, it uploads and displays that file only in the column.

On page refresh, all the other files are there too.


  • Participating Frequently
  • June 27, 2024

Alright. I was wondering if since the UI had an empty array, if adding the file added just that file to the array and saved that array in some fashion causing the “hidden” files to vanish. That would be really bad - and a bug.


dvdsmpsn
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • June 27, 2024

@anon29275264 @Matias.Monday This is certainly a bug, even if it is less serious than you considered it could be.

The API is returning an update successful on columns, whereas it’s not actually successful.


  • Participating Frequently
  • June 30, 2024

I don’t disagree, the current behavior is a bug.

File columns are definitely strange! Glad we were able to solve for the correct way to clear the column. Surprised just a “null” doesn’t clear it like every other column though… I thought all column types were supposed to now be clearable with a null.


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • June 30, 2024

Hello there @dvdsmpsn !

Would you be able to please fill this form explaining the possible bug you mention with as much information as possible so our team can take a look?