How to use data from a new entry to update a field in another sheet

I am trying to create an inventory management app that lets me check tools in and out from storage and updates their location in the app. I am able to create the entries for the check in/out with no issues, however, I would like these entries to update the location of these tools in my inventory view.

Currently, I have a “Tools” view which has the name, brand, serial #, and location of the tool. I have a “Tool Log” view that uses a form to create entries stating the tool’s ID, whether its being checked in or out, and the location at which the tool is being checked in or out from a list of job sites. I can create entries perfectly fine, however, I cannot figure out a way to have these entries update the location field for these tools in my Tool view, which is linked to a different sheet than the log.

I have tried setting up bots to automatically update the tool location field when an entry is created but I cant seem to be able to figure out how. Both sheets have the tool ID, which is how I would know which tool’s location to update, but there can be repeat tool IDs in the log view, which means I cant use the MAX() statement.

If there is any more information I can provide to help make a recommendation, please let me know. Any help would be greatly appreciated

1 Like

Welcome to the community!

Instead of running your actions through a bot, you should use a Form Saved action on your Log view. In this way, each time a log Form is saved the action will run in the context of the saved row and.update the Tools table based on the tool ID of the log.

2 Likes

Hi @leochiappini ,

Great question! I think you may be able to create this feature using the following action: Data: add a new row to another table by using values from this row.

Check out AppSheet Documentation for more info on this topic here: https://help.appsheet.com/en/articles/953637-actions-the-essentials

Let me know if this helps or if you need additional information.

Thanks,

Austin from AppSheet Training

2 Likes

Hello Austin,

Thank you for the suggestion for how to solve my predicament. This is a good idea but I do not want to add/delete rows from my “Tools” table, instead, I only want to update their locations. I know that I could just add a new row and delete the previous one, leaving only the latest version, however, I have information on the “Tools” table that is not present in the “Tool Log” table, hence, I would need to copy part of the info from the “Tool” table and part of the info from the “Tool Log” table. This could be the solution, however, it seems a little complex and convoluted to be the best solution.

Maybe I am misunderstanding what you meant by your response, please let me know if I am so I can give it a shot! Thank you for your help!

Hello Joseph,

Thanks for the warm welcome! I think your solution is the way I should go about implementing this feature into my app, however, I am struggling to figure out exactly how I would go about making the action interact with both spreadsheets simultaneously.

I guess I just dont really understand how the actions and expressions within them work yet. I will continue to play around until I figure it out, but if you know of any links or tutorials that I could reference, that would be greatly appreciated!