How to create a subitem via button?

Anybody got an idea?

So ideally, i want to have an external button, that adds a new sub-item, where ever “Subtask” is not empty.

Your question is a little vague. However, the relationship between parent and subitem is managed via the parent and subitem columns. I assume that you will be doing this from the parent row, with a button column in the table to do this.

You should be able to addrow() a new row via button, while adding the name of the parent row into the parent column of the new row.

Thanks for the answer. I added a table to the main thread.

Hi @Isebar_DE

I just edited your doc.
You just need to filter the table to return only rows that “Subtask” column is not blank and iterate over each value, adding a new row to the table and passing the parent task reference in the “parent” column.

Cheers
Arnhold

Just to clarify for future readers of this thread, the code used for the button is shown below…

Thx that solved it, problem fixed!