How to add multiple columns when adding new row to dropdown list

Here is a simple use case. I have meeting notes where the user will choose the company from a drop downlist. If the company is not on the list, they can add a new company. However, when adding a company name by choosing the + at the bottom it will only allow inputting the name of a new company.

Has anyone found a way to have a way so that if the user adds a company it will trigger a pop-up to add other company fields? I know I can add a button that says “Add company” and then I could add any details I want but it is a bit annoying to make the user first check if the company exists and then if not, add it, and then go back and choose it.

Has anyone come across any create ways to solve this?

:waving_hand: Chris,

Have a switchif formula in your button to do the check if company exists.
Then the label for the same button would be in company does not exist “add company” and if it does, “edit company”.

Hope this helps!

Cheers!
Mel

1 Like

That seems like a decent work around. Thanks Melanie.

1 Like

Am I right to say that since the Company is in another table I have to go through the fairly complicated process of creating a text button to get it to open from this table?

not sure what your set up is like… but if its a relation column i dont think referencing that column and appending an .OpenRow() in/as the button formula is a fairly complicated process??

sorry i dont know what you mean by a “text button”

hope this helps!

Cheers!
Mel

1 Like

This is what I am talking about How to open a row for editing (modal) from a different table using a formula - #2 by Bobby_Ritter? I tried alternative approaches but I couldn’t get it work without this approach.

If I just add a company it is easy to open a row. But if I want to edit it then I haven’t been successful at filtering it to choose the right row. That is why I chose above method.

Are you using the detailed view, rather than table view, for the inputting? If so would the display column as a table work for you (you can then choose which of the company table columns appear in this preview table so they can be amended straight away without navigating to the source table)

I use this in detailed view when there is only a few columns to input. Otherwise it gets unwieldy. Ultimately I have decided add only (not modify) is ok because that works and I don’t think modify is as useful in my situation and this works fine. Not sure why add only works well but not add/modify. I also too @Melanie_Teh advice and disabled the add if the entry already exists.

I really wish Modal views could have a submit like a form with required fields and submit before it goes into the tables.

Here is how I would approach this:
Create a helper table that will be used to create a new company.

That table will have a column to store the ‘source row’, from where the click came from.
Once your user clicks the ‘Add company’ button, you’ll create a new line on the helper table, setting its ‘source row’ as the current row.

The user fills the form and click ‘Add company’.
Once that is clicked you will:

  • Modify the source row ‘company’ to be a new company (which you are creating now)
  • Open the source row using openRow()
  • Delete the current row on the helper table.

That way the experience feels more seamless – people click the button, create the company and get back to where they were, with the value already set.

Very interesting. Will give it a go. Thank you.

Chris DeAngelis

Partner & General Manager

Alliance Development Group | www.adgchina.co

+86.18601243272 +1.212.647.0076

Subscribe to ADG China Insights

AD****G

China Growth Experts

HI Chris,

Is this what you are looking for?

This is the button formula:

Thanks Piet. What you did uses the +new entry at the bottom of the search when adding a new row. But I don’t like the way Coda makes you type in the name first and then click + to which I feel is not natural. So I was coming at it from allowing the user to click a column button first and then use it add a new company and then after choose the new company. In my opinion both ways work but could be improved. Best

Here is a more visual explanation of what I’m talking about:

With this technique you can even setup custom validation rules on the helper table to ensure you enable the ‘Add’ button only when all criteria are met.

1 Like

I really like this approach and will replicate it throughout my document. Thanks for sharing this!