Unlink a row in a relation column on the mobile app?

I’m using the Coda mobile app on iOS and I’m having trouble unlinking a row in a relation column. I have two tables with a many-to-many relationship. I need to be able to add and remove linked rows in the mobile app. Linking to an existing row is easy. Linking to a new row is also fairly straight forward. However, in the mobile app, how does one unlink a row?

After much fiddling, I found that I can swipe right on a row to get a menu with the options “delete”, “add below”, and “add above”. However, “delete” seems to delete the row from its own table, not just unlink the row. I want the row to continue to exist in its own table and continue to be linked to other rows, but not linked to this particular row.

For example, say I have a [Colors] table with a new row for each color.
Then I have a [Flags] table with a linked relation to the [Colors] table. Several flags are linked to the colors red, white, and blue. Then, in the mobile app, I discover that a flag that does not contain red was accidentally link to red. How do I undo that link? I don’t want to delete “red” because it needs to remain for all the other flags. I could try to make a note to go back and fix it when I am at a computer, but I really want to be able to fix it right there on my phone. Is this a bug or am I missing something?

Hello @Kuovonne ,

Without looking at a (dummy) doc that shows your tables, it is a bit hard to help you. But my assumption is that there is a column that holds data establishing the link to the other table.
Make a button to modify the current row and have it delete the contents of this column (for the active row only!).
Depending on the place of this button it the table(or view) (more to the left is better) it will show when you swipe te row.

Greetings, Joost

1 Like

Thanks for the reply. Here is an example doc.

Here is a screen shot of the doc on a computer.

When I right-click the item I want to unlink, I can choose to “Remove row here”.
image

But on the mobile app, I don’t get the “Remove row here” option. The “Delete” option deletes the row everywhere.

I don’t want to delete the entire contents of the column. I only want to unlink one row in a many-to-many relationship.

Hello @Kuovonne ,

I am not sure how you added the colors to each flag, but I included a select item to add or delete colors for each flag.

I made an ‘object’ for each color (ColorObject), which I find easier to work with when setting up filters.

Say at some point, you want to have colors light-green and green. When working with objects, these are two completely different items. When you work with plain text and you try to filter on green, it will also show light-green.

There are more ways of doing what you are trying to do and my suggestion with the select column is just one of them. When you add colors to your color table, they are immediately available. And select also works on mobile.

Obviously, you can make different views where one view allows you to edit the color choices (perhaps on a hidden page) and another view (for your users) doesn’t show the select option.

Greetings, Joost

1 Like

Thank you for the example. It is an interesting technique (having a select column with choices driven by rows for the color table, and then having the relation column driven by a matching formula).

I’m not sure how I feel about having a select column, though. It makes the schema more complex than I would like. I was hoping there was some menu item or swipe technique that I was missing.

Hello @Kuovonne ,

Yes, I understand what you are saying. But you are just embedding a color table here. If you want to get a “magic” undo button, you have to embed a table with relations to your color table. It is not complicated, but a bit more work to setup and a bit more overhead. If I have some time to spare I will show you another setup.

Greetings,
Joost

1 Like

Hello @Kuovonne ,
I made some changes to your doc - it’s not ideal, but, on mobile, you can swipe on the flag colors and you get to see the “delete this color” button.
In order to make your doc a bit more secure, you really need locking (I am not sure it’s in your subscription) to prevent people from deleting things like the complete flag.
There are some limitations in mobile layout, but hopefully this gets you a bit further.
Greetings, Joost

2 Likes

Hey @Kuovonne ! Just a heads up that we’ve gone ahead and tracked your vote for this feature formally to “​have the remove row from here option in mobile”.

1 Like