Skip to main content

Two issues I could use advice on:




  1. Longtext Column. I am updating column with string and can type returns/new lines manually in the field but inserting them via the API always fails. Can Someone point me in the right direction to keeping the formatting? I have tried both Return and New Line.




  2. Best Practices with subitems. I tried following these steps -





Step 1: Read CSV Data to add to board convert to paragraphs(rows).

Step 2: Repeat thru Rows

Step 3: create_Item using Board ID with about 5 column_values using some row info of CSV

Step 4: create_subitem using Parent Item ID with about 10 column_values using rest of row info of CSV

Step 5: End Repeat



This process always fails on the 2nd loop of Step 4 no matter the column_values.


If I change step 4 from create_subitem with column_values to create_subitem using Parent Item ID eliminating the column_values option, add another step of change_multiple_column_values changing the Board to Subitem board it does not fail.


Any idea why the process with extra step works but the other fails?

Thank you

hi @dean_m


For 1. you can just send a \\n in your string. Remember that newlines are only shows when you click the long text column. In boardview the newlines are ignored.


For 2. I guess there is something wrong with the format of your column_values when you use it as an argument in the create_subitem mutation. If you share the mutation we all can have a look 🙂


No idea why I have to triple backslash but this is the only format I had success with although it fails the second time around.


{"query":"mutation {create_subitem (parent_item_id: 3653935425, item_name: \\"881485 - 1\\", column_values: \\"{ \\\\\\"date0\\\\\\": \\\\\\"2022-09-21\\\\\\", \\\\\\"text18\\\\\\": \\\\\\"XXXX\\\\\\", \\\\\\"text2\\\\\\": \\\\\\"WDMK\\\\\\",  \\\\\\"text26\\\\\\": \\\\\\"\\\\\\", \\\\\\"text14\\\\\\": \\\\\\"B - Black\\\\\\", \\\\\\"text1\\\\\\": \\\\\\"CC-QZ\\\\\\", \\\\\\"text21\\\\\\": \\\\\\" (verify) - some text\\\\\\", \\\\\\"text4\\\\\\": \\\\\\"None\\\\\\", \\\\\\"text0\\\\\\": \\\\\\"_XXXX__B\\\\\\", \\\\\\"text47\\\\\\": \\\\\\"CC-QZ_Black_WDMK_17585\\\\\\" , \\\\\\"text3\\\\\\": \\\\\\"3B\\\\\\", \\\\\\"text9\\\\\\": \\\\\\"1\\\\\\" ,  \\\\\\"numbers\\\\\\": \\\\\\"1\\\\\\"}\\"  ) { id }}

I don’t think the argument column_values accept simple column values. AFAIK you need to pass them as a JSON. The JSON format for a date column (date0 in your example) is


mutation {
change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\\"date\\" : {\\"date\\" : \\"1993-08-27\\", \\"time\\" : \\"18:00:00\\"}}") {
id
}
}

It works in create_item as simple column values. Do you think that’s a restriction of sub items? Some of my values in the step 3 are that format and It repeats successfully if I remove the step 4 of creating subitems as part of the loop.


Hi @dean_m,


Could you please share the exact query and error you’re seeing?


Thanks!


Reply