candyOrate
(Leah Candy Orate)
August 10, 2022, 4:04am
1
Hello. Can anyone help me with this one? I have this creation of item via c#.
da is the date column id
dueDate is “2022-08-16”
string query = "{"query" : "mutation { create_item (board_id: " + boardId + “, group_id: \"” + groupId + “\" , item_name: \"” + name + “\", column_values: {\"” + da + “\": {text: \"” + dueDate + “\"}}) { id } }"}”;
But respond an error which is
{“errors”:[{“message”:“Parse error on "date" (STRING) at [1, 125]”,“locations”:[{“line”:1,“column”:125}]}],“account_id”:7398594}
basdebruin
(Bas de Bruin)
August 10, 2022, 9:08am
2
A date column needs to have a JSON with date, not text
See: https://api.developer.monday.com/docs/date#json
mutation {
change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"date\" : {\"date\" : \"1993-08-27\", \"time\" : \"18:00:00\"}}") {
id
}
}
candyOrate
(Leah Candy Orate)
August 10, 2022, 9:23am
3
I tried it. Still got this error.
{“errors”:[{“message”:“Parse error on "date" (STRING) at [1, 80]”,“locations”:[{“line”:1,“column”:80}]}],“account_id”:7398594}
basdebruin
(Bas de Bruin)
August 10, 2022, 9:28am
4
Fid you escape teh date string in the JSON?
candyOrate
(Leah Candy Orate)
August 11, 2022, 7:31am
5
Yes I did. Already escaped
basdebruin
(Bas de Bruin)
August 11, 2022, 9:21am
6
Can you share your full query string as build and show it as formatted test. This editor has it’s own mind on escaping and formatting, so it is better to always enter this kind of data as a preformatted text (using the </>
button.
candyOrate
(Leah Candy Orate)
August 11, 2022, 9:57am
7
I tried multiple queries but returns error.
query = “{"query" : "mutation { change_column_value(board_id: 3063556967, item_id: 3075649406 , column_values: {\"” + “date” + “\" : {\"” + “date” + “\" : \"” + “2022-08-16” + “\"}}){ id} }"}”;
–{“errors”:[{“message”:“Parse error on "date" (STRING) at [1, 92]”,“locations”:[{“line”:1,“column”:92}]}],“account_id”:7398594}
query = “{"query":"mutation{ change_multiple_column_values (item_id:3075700297, board_id:3063556967, column_values: \"{\\"status_1\\" : {\\"label\\" : \\"Done\\"}}\"){ id} }"}”;
–Newtonsoft.Json.JsonException: ‘The response from https://api.monday.com/v2/ was InternalServerError’
basdebruin
(Bas de Bruin)
August 11, 2022, 2:48pm
8
Sorry, I can’t analyze these as they are formatted text, please add them between
triple backktick or use the </> button in the format bar
The formatter here deletes escapes characters.
james
(James)
August 16, 2022, 3:43pm
9
Hi - let me know if you have not solved this. I have done this before and might be able to provide you with assistance if you still need it
candyOrate
(Leah Candy Orate)
August 17, 2022, 1:06am
10
Hi! I already solved this. I also created a new topic regarding here. Thank you!
Hello! I wanted to share my work which spent some time and patience.
I tried a lot of format that returns multiple errors. I also got an idea from someone here in the community but I forgot the name. Well, thanks to you.
Hope this helps! Happy coding!
[image]
This results to:
{“query” : “mutation { create_item (board_id: 3063556967, item_name: "Daily xxx" , column_values: "{\"date\" : {\"date\" : \"2022-08-15\"}}"){ id} }”}
Remember the escaping.