Update all rows value for one column

Hello All,

I would really appreciate some help with my blocks. I have just started with an app and it is based a production. I have created my database within thunkable and it has 4 columns being Ingredient name, quantity needed per manufactured product, master case quantity, and master case needed. The master case needed is an empty column. The apps function is to calculate how many master case is needed based on the manufacturing quantity. I have tested the function for row 1 by creating a variable for user input for “manufacturing quantity” and it works and calculates correctly however my problem is that now I have to duplicate the blocks for row 1 and change the row id to 2 so it can can make the calculations for the other ingredients. is there a way where thunkable can calculate all the row values for the master case needed column without having to a set of blocks for each row of ingredients.

Sorry for the confusing explanation, Any help would be greatly appreciated.
I have added an example of the block below.

1 Like

I’m not following what you’re saying. Is it possible for you to show what the data set looks like when new and before/after these events?

1 Like

I assumed from the block image that you want to update the actual table. So you need to go through all records one by one and do your calculations. I this is correct then do something similar to this.

1 Like

Thank you for your response, Sorry for the confusing explanation .

Hi Muneer

Thank you very much for your help . I have tried it and the app is functioning exactly how I wanted to. I just made one change from your suggestion, instead of list of values in the “count with” I used “number of rows in the table” and it work perfectly!

Thank you! :grinning:

1 Like

Yes, you are correct. That was a mistake from my side. It should be number of rows.

Thanks for the correction.