Discussions

 View Only
  • 1.  Importing a template but not duplicates

    Posted 07-01-2020 23:08
    I have actually found a solution to this, but it takes a long time to run in pipelines and was wondering if anyone could think of a more efficient way.

    Scenario: I am using a pipeline (can also be done with automations) to import a template. More specifically, I have a template table where certain employees are tagged with a certain contract. So, John, Mary, and Jim are part of contract A. Peter, Mark and Linda are part of Contract B. Etc. In my project setup form, there is a contract select. Press Import Employee template, and a pipeline searches the template table, finds everyone in the correct contract, and creates records in a third table that acts as a many to many table (Project Set Up Forms and Employees are both related to this third many to many table). Everything works as expected.

    Problem: I want to give my users flexibility. Maybe they delete some of the employees that were created from the template, and now want to reimport and complete their table. Sure, I could 'force' them to delete everyone and run the pipeline again, but it's slicker to just import any missing employees.

    My solution:
    1. Pipeline searches the many to many assignment table for anything with Related Project Form = trigger Record ID. For each result, pipeline searches the template table and marks a checkbox 'Template Employee Exists'.
    2. Pipeline searches Template table, for anyone in the correct contract, with exists checkbox=false. Creates records based on this search.
    3. Pipeline searches template table for anything with exist checkbox true, and resets to false.

    The good: It works.
    The bad: It takes a really long time. Like 30 second to 1 minute to finish, and I don't even have my template table full yet. It's maybe 1/10th full. Also, it would be very unlikely, but if two people run the pipeline at once, the 'exists' checkboxes will be checking and unchecking at the same time and surely create funny results.

    Anyone got a better idea?

    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: Importing a template but not duplicates

    Posted 07-02-2020 05:21
    Mike,
    I think that this can be done using the User Focus method in a single click to execute a URL formula button with an instant result.  Contact me off line. 
    Mark

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------