Change column value after to enter a register in another table

Hi community,

 

I have,

the table Invoice: ID_Invoce | Date invoice | Total Value | Quotes (this column is a Enumlist ref Quotes[ID_Quotes])

 

the table Quotes: |ID_Quotes | Date quote | Status Quote | Value Quote |

When I make a record in the table Invoice, I can choose multiples Quotes (ref to Table Quotes)... How I do to automatically change the status in the table Quotes | Status Quote | in all the rows selected in the record in the table Invoice?

 

I hope to use a bot, but I can find the way to do. Thank you very much, and sorry for my english

 

Solved Solved
0 8 219
1 ACCEPTED SOLUTION

You might try the following.

1. On table Quotes - Create an action to set the status to 'CLOSED'

2. On table Invoice - Create an action of type "Data: execute an action on set of rows

  • Referenced table = Quotes
  • References rows = [Quotes] <- this is the enum list col in Invoice table
  • Referenced action = the action you created in step 1

3. Inside the invoice_FORM where you create a new entry in the Invoice table, set the Event action under Behavior to the action you created in Step 2

When your user creates an invoice entry, selects related quotes and saves the record, the status of the selected quotes should be set to 'CLOSED'

Hope this is what you want to do!

View solution in original post

8 REPLIES 8

You might try the following.

1. On table Quotes - Create an action to set the status to 'CLOSED'

2. On table Invoice - Create an action of type "Data: execute an action on set of rows

  • Referenced table = Quotes
  • References rows = [Quotes] <- this is the enum list col in Invoice table
  • Referenced action = the action you created in step 1

3. Inside the invoice_FORM where you create a new entry in the Invoice table, set the Event action under Behavior to the action you created in Step 2

When your user creates an invoice entry, selects related quotes and saves the record, the status of the selected quotes should be set to 'CLOSED'

Hope this is what you want to do!

Thank you very much,  Your solution was very helpful. This solution worked perfectly!
You have a new friend in Colombia!

I've spent ages trying to do something like this. Your example was the easiest to follow and works perfectly. Thank you so much!

Hello TeeSee, it is me again 🙂
While searching deep into the community, I came across this solution. It is somewhat similar to what I am trying to accomplish. Is it possible to make these changes without editing the form? When I select items in quick edit mode, I want the status to be updated based on whether they are selected or not in the list. 

Thank you for your time


@Atlas wrote:

whether they are selected or not in the list


If you do not select quotes, how do you know which ones to change?

That point aside, if you want to use a detailed view with quick edit, you can use a bot with a change event to fire the action.

 

I am sorry, my statement was false. The status should be changed from blank to close when it is selected, and it should be changed from closed to blank when it is deselected in the list.

In a bot, you can compare before and after values. I suppose you can take advantage of this to set the appropriate status.

I'm having some trouble with my bot's configuration and could use some help. I think I might've messed something up, and now it's not working. I'm not sure how to figure out what's going on, so any assistance would be much appreciated. Thanks for taking a look!

 

Atlas_0-1670276576281.png

 

Top Labels in this Space