Set column values from 1 sheet to another

Hi All.

My app is a proposal / contract creation app. Creating the proposal is complete and easy however once won I’m trying to create an action button to turn it to a Contract.

There are 2 sheets for the proposal:

  1. Proposal Sheet: Contains the client details etc
  2. Proposal Items sheet: contains the items being proposed.

There is a relation and the Row ID of the Proposal sheet is the Proposal ID in the item sheet. The Proposal sheet has a relation column relating these 2 columns.

When the proposal document is first created there is a form to add document name, client details etc. When I hit the edit button I have another button to add products. This opens a new screen with the product list. I have an action set to be able to click on the products and a new row is added to the Proposal items sheet including document ID and any other info I want to add.

What I am wanting to do is to have an action button within the proposal screen to convert it to a contract. I’m trying to set the column values of the proposal sheet to the Contract sheet as well as the Proposal items to the Contract items but I can’t seem to figure it out.

Any advice would be welcomed.

cheers

Instead of trying to move everything to different tables, couldn’t you simplify it a lot by having just a client table and an item table, link everything the way you are now, but when a proposal becomes a contract, all you do is change a status in the client table, and that’s it…everything is now a contract.

Not sure as the proposal is converted to a PDF for output and presentation and doesn’t serve as a contract as well. Once it’s gone to contract the document is different. It has the same basic data but different signature panels etc.

Well, you can easily move one row from one table to another, but moving a set of multiple rows is a whole different story. You can still have different screens for Proposals vs Contracts. Or the alternative I guess is to just have one Item table, but separate Proposal and Contract tables that relate to the same Item table. When you move from proposal to contract, you can have an Add Row to Contract action followed by a Delete Row from Proposal action, or a Set Column action to set a value in the proposal to hide it.

1 Like

Thanks for your reply. Using the same items table would be fine. I could just add a Contract ID column for it to relate to. I’m still not sure if I can set column values for 2 different sheets though

I’m unclear about your whole data structure, but as long as you have a relation in place, you can set the value through that relation (single row).

If you need multiple rows, Glide API is the way to go (Trigger Webhook with Make or Call API on Business/Enterprise).

1 Like

You can set column values through a single relation to a single row, so it is possible to set values in multiple tables, but in a case like yours, it’s not possible to set a contract ID in multiple items rows (at least not without using third party integrations and API’s).

What you are proposing is going to lead to pretty much the same problem. What I’m suggesting is that you use the same ID and link to that ID from both the Proposal and Contract table.

1 Like

Apologies for the late reply.
The way things are now is I create a document type (proposal or contract) and it’s stored in a documents table.

The row ID for that document is the document ID for the Proposal.

The Row ID for the proposal in the proposal sheet becomes the Proposal ID in the Proposal Items table

There is a ‘items’ relation column which matches the row ID to the Proposal Items Proposal ID.

All this works beautifully and the result is:

Ready for PDF creation and email or printing.

I wanted to create an action to convert the Proposal to a contract. This would create a new Contract in the documents table and the contract table. It would also link to the products in the Proposal Items table. Based on feedback so far this isn’t possible because it can’t write the same ID to multiple lines.

Hopefully this explains the current process and structure a little better.

Can you explain the process you are describing?
Thanks in advance for your help
cheers

So you have a Documents table, a Proposal table and a Proposal Items table?

Is there a reason you don’t just create the Proposal inside the Documents table?

The overall point I’m getting at is that you should have one universal ID that links everything together regardless if it’s a Proposal or a Contract. When you go from Proposal to Contract, you can use the same ID

You should not need to change anything in multiple rows. The ID shouldn’t change, but when you go from Proposal to Contract, you change a status and that’s it. It’s much easier to change a status in one parent record, or create a different parent record with the same ID, instead of having to modify multiple child records.

You would still want some way to link the Proposal and Contract together, wouldn’t you? In that case why not use the same universal ID?

2 Likes

Hi Jeff

Thank you. Do you mean a column like a boolean that if it is true then the contract ID = Proposal ID for example? Do you have an example?
cheers

I don’t have an example. Just trying to explain how I would probably do it.

When you have a Proposal and it becomes a contract, what I’m saying is that you would write that Proposal ID to a column in the Contract. That way the ID never changes. Then the Contract can link to everything else using the same ID.

The point I’m trying to make is to adjust your app flow so you don’t have to touch those Item records. Just use the same ID whether it’s a Proposal or a Contract.

1 Like

:thinking: Thanks for your reply…Our proposal title is generally an Alpha Numeric acronym: A combination of our name, customer name, machine and date. eg MMCPXCRF1622024. When we create a contract the number is an alpha numeric from our ERP which we get allocated eg E1477. In thinking about what you’re saying when it converts to a contract this title could be written to a column in the proposal sheet, items sheet and the contract sheet, this becomes the universal ID linking it all?

I already have the contract template setup so that when it becomes a contract I can then print that document out for signing.

cheers

Mike

Sounds like you are still thinking you need to update all rows in all tables when a proposal becomes a contract. That’s going to be complicated. Why not create a Proposal and assign it a unique ID. Then create your items with that same unique id in every item row. Then when you create a contract from the proposal, you also assign it that same unique id. Then all of your relations can use the same unique id which will always be the same in every table. Nothing has to change in the item table. It can link to either the proposal or the contract at the same time. No need to update multiple rows in multiple tables when you create the contract. Just write the existing unique id to the contract and every will link up automatically without have to update multiple rows. You can still have your proposal title and contract number in different columns,but if you need them in the item table, then you can just use a relation/lookup to bring that title or contract number into the item table.

3 Likes

Nice logic.

1 Like