Skip to main content

Multiple Choice Columns Mutation clears Column Values from Columns with Same Dropdown Choices

  • October 27, 2021
  • 3 replies
  • 973 views

As stated in the title, when I use a mutation to change the values of a column with multiple dropdown values, it clears out the values of a column that has the same dropdown options. I’m using axios.

      query: `mutation ($itemId: Int!, $boardId: Int!, $columnValues: JSON!) {
              change_multiple_column_values (
                item_id: $itemId,
                board_id: $boardId, 
                column_values: $columnValues
             ) {id}
            }`,
      variables: {
        itemId: parseInt(contactId),
        boardId: 1234567,
        columnValues: JSON.stringify({
          // PRE: birth plan (Multiple Choices)
          dropdown06: { labels: preBirthPlan },
          // POST: birth interventions (Multiple Choices)
          dropdown97: { labels: postBirthInterventions },
        }),
      },
    };
    const { data } = await axios.post("https://api.monday.com/v2", body, {
      headers: {
        "Content-Type": "application/json",
        Authorization: process.env.MONDAY_API_KEY,
      },
    });
This topic has been closed for replies.

3 replies

  • Author
  • New Participant
  • October 27, 2021

RESOLVED: I was sending an undefined as a value which cleared out the column


dipro
Forum|alt.badge.img
  • Leader
  • October 27, 2021

Hey @philipprobyn – Dipro here from the dev success team.

I’m glad you were able to solve this issue! In the future, I’d recommend posting in the Developers & API category to ensure your question reaches someone from our technical team.


  • November 3, 2021

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.