Copying data from table to table... and avoiding lists of lists

Hey Codans,

I ran across a problem I’ve encountered before - and was hoping to figure out the “best practice” for solving it.

Essentially it comes from copying data from one table to another (where the data can be changed in the “copy”)

I’m getting lists of lists of lists… and lists where I’d rather a single item etc.

So I’m wondering where to use .first() and .list() and .totext() etc.

This particular version of the problem Its a slightly difficult one to describe simply in a message - so instead I’ve mocked up a new feature for our project management system which shows the problem very clearly. The feature is a little complicated, but I’ve annotated the entire page / described each table, and showed where the problem is occurring.

Help would be much appreciated - and I’d even like to create a simple reference page on when to setup lookup formulas in particular ways. I’m guessing for those here who are used to programming, these things come quite easily. However, for those of us like me who are NOT programmers, understanding conceptually whats going on with the solution is key to being able to work on problems like this. And at least I think I understand conceptually what is going wrong thanks to a bunch of posts in this forum (and replies to previous topics of my own)

Thanks all.

I’ve also learn’t loads from this - but still have had trouble figuring it.

I’ve duplicated my page and going to have a go. I tried earlier with no luck, but I’m reading / trying again.

And I’ve solved things - but I still don’t quite understand a couple of things.

I duplicated all the tables and went thru table by table looking at all the buttons and their formulas.

Problem 1. Instead of using thisrow.column, I used tablename.column
Now, I really don’t know WHY i did it this way - I guess I was just trying to be really specific. But it was already making lists of lists…

Here’s a little test showing whats going on

Anyway - that aside the thing that helped things work properly was

  1. When adding a row, and putting a single data selection in a column of a table using a button, you need to use .first() at the end of the formula to output a single item rather than a row. This stops us getting a list of one.
  2. When adding a row and putting in multiple selections into a column of a table using a button, I needed to use listcombine() in order to get rid of the list of lists.

Can anyone tell me a better approach? From everything I can see, it works well.