Forum Discussion

benrizz17's avatar
benrizz17
Qrew Member
9 days ago

Table Comparisons

I have two tables, both of which contain parts inventory information. One table is called "Inventory" and is my master table for parts info. I have another one that each night is pulling parts info from another software via Webhook (this part is working just fine) and creating entries for parts inventory in a table called "Temp Inventory".

My question is if there is a way to take each entry from the Temp Inventory table, compare with all entries of the Inventory table (using the part # as the comparison), and if no match to the part # is found, create a new record with that Temp Inventory info. If a match is found, then no action is required. After this comparison is completed, the Temp Inventory records are deleted until the next day when the process is redone.

Any help would be greatly appreciated!

  • It's definately possible.  Can you tell me the Key field of each Table?  That will determine if we have to do a medium complicated Pipeline or an easy pipeline.

    • benrizz17's avatar
      benrizz17
      Qrew Member

      Right now the key field of the Inventory table is the Part #. The key field of the Temp Inventory field is the Record # but that can be changed if need be. Whatever will make it easiest.

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Ok, let's say that you change the Key field of Temp to Part #. 

        Make a new formula text field in Inventory called [Part# mirror for relationship] with a formula of [Part #]

        Then make a relationship where one Temp  has Many inventory based on that field,

         Then make a summary checkbox field on the relationship if there are Any Inventory records. 

        ok, so now we have a checkbox field on Temp that will be unchecked if the Temp part has no corresponding  inventory part. 

        So now actually, you can make a simple two step Pipeline to trigger when a Temp is created and it has no Inventory, and the next step will be to create an inventory record. 

        Feel free post back if you have questions.