Skip to main content

I need to add a date to a date column when I create an item on a board. Here is my code. It does add the item, but the date field is left blank. Any help is greatly appreciated.


mutation {

create_item (board_id: 6137175354,

item_name: “Bills New Item22”,

column_values: “{"date":"2023-05-25"}”)

{ id }

}

Hi @billyt,


Welcome to the community!


My guess is that it could be one of two issues (or both):



  1. Your column values aren’t escaped (see example here).

  2. Your date column has a different ID. You can check this by querying for the ID or clicking the three dots next to the column title in the UI.

    Screen Shot 2024-03-22 at 10.06.00 AM


I ran the query below and my date column was populated:


mutation {
create_item (board_id: 1234567890, item_name: "Date column value item", column_values: "{\\"date4\\":\\"2023-05-25\\"}") {
id
}
}

Let me know if this resolves it!


Best,

Rachel


HI Rachael,


Thank you and that did work. I apologize, I put in the wrong code, but my other code did not work either… but at least I had the quotes escaped. The key to getting it to work was to change the ID from Date to Date4.


I tried clicing on the 3 dots next to the column title in the UI. I couldn’t find anywhere the id of the field, which turned out to be Date4. There should be an image that shows what I see when I click the 3 dots, am I missing something?


Thanks… Bill


image


Turn on developer mode to get those IDs to show up. Its in monday labs.


Here is a specific article on IDs, including column ID. https://support.monday.com/hc/en-us/articles/360000225709-Board-item-column-and-automation-or-integration-ID-s


Thank you, that is exactly what I needed.


Hello again, one more quick question. When I insert the date it is showing up as “May 29”, I would like it to display as ‘2024-05-29’. Is there a way to do that. When I add one via the UI it displays correctly. Thanks again … Bill


2024-05-29 is not one of the supported date formats for a date column for me. The format is set on the column itself in the UI and not by API. I know of no way to enter a date in the format you suggest in the UI of the column.


image


Thank you … that worked like a charm. Thanks again.


Reply