Hi Team,
I would like to retrieve customized values that have been set as labels within a Monday.com board. Is it possible to achieve this using GraphQL? I am interested in obtaining values directly through GraphQL, even if they have not been explicitly assigned to a particular item. I have both the column ID and the board ID at my disposal for this purpose.
Also I have another column known as Tags which is connected to external board Tags.
I have created a Node JS script using API that will create the same column from Master Board(it is the board where we if add or remove any column) then it should reflect on the target boards where we want same changes. But at the same time I cannot able to set the value of column connected with external board from master boards to targeted board. Although column is getting created.
Need assistance in this.
I want this options coming from tags board automatically being fetch in all other rest of the targeted board when script is run.
Basically I want the new columns that are getting created on targeted boards should have same configuration as that of from the masterboard
The query you want if you’re trying to get a status columns labels is:
query{
board(ids: 1231545){
column(ids: "columnId"){
settings_str
}
}
}
{
"data": {
"boards": [
{
"columns": [
{
"settings_str": "{\"labels\":{\"2\":\"Visit Created\"},\"labels_colors\":{\"2\":{\"color\":\"#e2445c\",\"border\":\"#CE3048\",\"var_name\":\"red-shadow\"}}}",
"id": "status_18"
}
]
}
]
}
}
The string returned is JSON and will need to be parsed. the labels
is a [key: string]: string
where key is the index and the value is the label text. There is also labels_colors
which also uses the status index as the key, and has an object with the color information.
Thank you @codyfrisch for the help!
@Shreyas13398 regarding the second question, would you be able to please send us a screen recording explaining exactly what you are trying to achieve, and showing us your script for it to appsupport@monday.com so we can take a look into it?
Looking forward to hearing from you via email!
Cheers,
Matias
Hello there @Shreyas13398,
Sorry for the late reply!
Would you be able to please send this over to appsupport@monday.com so we can take a closer look and provide a solution for you?
Looking forward to hearing from you via email!
mutation {
create_column(
board_id: 5128374144
title: “Project domain”
column_type: status
description: “This column indicates the domain of each project.”
defaults:“{"labels":{"3":"soumyajit","105":"shreyas","156":"jayesh"},"labels_colors":{"3":{"color":"#e2445c","border":"#CE3048","var_name":"red-shadow"},"105":{"color":"#FFCB00","border":"#C0AB1B","var_name":"yellow"},"156":{"color":"#00c875","border":"#00B461","var_name":"green-shadow"}}}”
) {
id
}
}
its giving me columns like this:
Instead I want like this with below color mapping:
Can you check and help me in this!
If you’re creating labels in a new column based on another column you have no way to control the colors from the API. End users must set them from the UI. You can only get the colors for purposes of rendering your own views, not setting them when adding a label to a column.
Hi @codyfrisch,
ID: xyz,
Title: Client List,
Type: board_relation,
settings_str:{“allowMultipleItems”:false,“allowCreateReflectionColumn”:false,“boardIds”:[4303112309],“boardId”:4303112309}
Is it possible to set the ‘settings_str’ configuration for a new column when the column type is ‘board_relation’ and also incase of “formula” during its creation using graph QL?
It is not. most column creations are limited to just creating the column. Status is actually one of the only exceptions to that.
Definitely something we all want though, so be able to create columns, or modify columns in API (esp the ability to configure a connect boards column to connect to certain boards!)