I’m working on Tool tracking app and I’m currently trying to solve following scenario:
There are Transport unit (carts) on which multiple tools are prepared for designated production line. I have logic in app to know what has to be prepared on transport unit.
Some tools are in Tool kit (individual tools that has to be used together to function properly) and additional individual tools. Each tool is stored in Tulip table, tools which are part of a group have ToolKitId column filled and individual tools have this column empty.
Part of Tools table:
Tools with IDs BH1G9_1, BH1G9_2 … are individual tools. Other that does not have empty TollKitId are part of tool kit.
Each tool is in Tools tulip table and have column Transport unit id. Transport unit id is generated in app with combination of Production line Id and Random string generator.
I can filter out and display correct tools on Interactive table widget that needs to be on Transport unit. In image below upper interactive table contains Tool kits and table at the bottom contains Individual tools. Tools from selected ToolKits and individual tools must be prepared for Transport unit.
So finally my question:
A need to update filed TransportUnitId on all selected Tools (individual and tools in tool kits) like shown below:
(Not exact sample from step image above but I think it is clear what have to be done)
Currently I don’t know how to do that. In “SQL language” I would update TransportUnitId on multiple rows based on filter "where ToolKidId in ([Id1], [Id2]…) for ToolKits and "where id in (…) for individual tools.
I need some guidance, how to do that.