Skip to main content

Read Only Columns

  • October 14, 2024
  • 1 reply
  • 16 views

bradfoster

Is it possible to make all cells for a given column read-only via the API? I’d like the column’s value to only be updated via my item view app. I don’t want users to be able to manually change the cell value for the column my app creates.

I’m creating the column itself via this api call:

export async function createColumn(boardId: string) {
  try {
    const response = await monday.api(`
      mutation {
        create_column(
          board_id: ${boardId}
          title: "Example Status"
          column_type: status
          description: "This column indicates status."
          defaults: "{\\\\"labels\\\\":{\\\\"0\\\\":\\\\"In Progress\\\\", \\\\"1\\\\":\\\\"To Do\\\\", \\\\"2\\\\":\\\\"Done\\\\"}}"
        ) {
          id
        }
      }
    `);
    return response?.data?.create_column?.id;
  } catch (error) {
    console.error("Error creating status column:", error);
    throw new Error("Failed to create status column");
  }
}

Based on the columns documentation I’m not seeing any parameters that allow it.

Is there another way to make all cells for a given column read-only that I’m missing?

1 reply

  • Participating Frequently
  • 948 replies
  • October 15, 2024

I would suggest submitting this as a feature request.