Forum Discussion

IvanWeiss's avatar
IvanWeiss
Qrew Captain
2 years ago

Restructure App Hierarchy with Data In Place

I have a bit of a structural issue in my app I need to fix.

We developed a CRM / Purchasing system with tables as follows:

  • Opportunities:  To Track the sales potential of a new client opportunity
  • Orders:  To track the order value once approved
  • Invoices:  To track each individual invoice as we partial invoice on progress in our industry
  • Later we realized we need a Proposals Table to track the proposals we send to our clients.

The structure of my app today is:
Opportunities < Orders
Orders < Invoices
Opportunities < Proposals

20/20 hindsight I have realized this creates some issues and the flow should be:
Opportunities < Proposals
Proposals < Orders
Orders < Invoices

I have a lot of data in each of these tables, lots of reports, etc.  It is all very very important.

How would I go about making this structural change without things blowing up on me?  Any suggestions on how to start?  Physically creating the relationships is fine, I just want to ensure my data stays in tact and my reporting fields (looks and summaries) work as I am about to insert a table into the middle of existing relationships.

There are pipelines, reports, relationship fields, etc. all on all of these tables.

------------------------------
Ivan Weiss
------------------------------

5 Replies

  • DwightMunson1's avatar
    DwightMunson1
    Qrew Assistant Captain
    Depending on the reports and pipelines you may need to change a lot of it. Lookup fields are easy because they can be pointed to a new field, but summary fields would need to be changed too. 

    I would probably start by making the new relationships. Getting the proposals created on the opportunities. Then Linking the orders to the proposals. Then I would look at the fields you need to pass from opportunities to orders and get those set up and transferred. Get the reports realigned, then work on the pipelines. 

    In the meantime you could make the related field between opportunities > orders a formula that points to the proposals table related opportunity. It's going to be a bit of a painful process. I've done things like this before. Eh...I DO things like this. A lot. I took over this position in December of last year, and I'm still fixing things and restructuring things.

    ------------------------------
    Dwight Munson
    ------------------------------
  • Hey Ivan,

    I feel your pain! 

    Thankfully QB offers some pretty nice tools that you may be aware, but are worth mentioning:

    • In App Management you can Show Relationship Diagram, I'd make sure to tidy and study.
    • In a given Relationship, you can see the fields involved on both sides (the Parent Summaries and the Child Lookups and foreign key)
    • On a given field you can see the Usage and Dependencies
    • The Usage provides links in which you can repeat the process to again view Usage and Dependencies.
    • The Dependencies provide a field ID, which you can manually key into the URL to more quickly navigate (since they are not linked)

    With these tools, we need to basically go through each impacted field. One convention is to prefix fields that you'll be deprecating with a lowercase letter "z" instead of deleting them. But be careful as renaming fields could potentially break other processes such as Pipelines or API calls (typically not the latter when referenced by FID). For example, if you had a "Name" field that would become "zName" to indicate you have assessed the field and it's no longer necessary. This is nice when sorting fields by too (to shuffle them to the bottom of the list).

    Or you can try to kinda hijack lookup fields instead of deprecating them, by changing their name the value they point too. But I typically wouldn't use this "sleight of hand" technique  in larger refactors (such as this one) and instead I'd try to keep the old system in place until the new system is build in parallel.

    Then, once you tested everything you can delete the older relationships and "z" fields.

    Also, worth mentioning is Quickbase keeps backups of your app that you can request if necessary. But you can also copy an app with its data if you want to create a playground to test the new architecture first. There is also Sandbox functionality too!

    Also, you could potentially leverage Access Permissions to disable viewing, adding, and editing of records in the older tables before deletion to make sure there are no issues.

    Anyway, there is no simple answer. Just plan it out and then methodically flag and eliminate the older fields and relationships. You've got this ;)

    ------------------------------
    Brian
    ------------------------------
    • IvanWeiss's avatar
      IvanWeiss
      Qrew Captain
      Thanks everyone, appreciate this and will be reading through it, digesting, and preparing myself mentally lol

      That being said correct me if I am wrong but the usage does not connect to pipelines.  I dont think I have any pipelines that might be affected but anyway to monitor that or I just need to manually go through them and see?

      ------------------------------
      Ivan Weiss
      ------------------------------
      • DwightMunson1's avatar
        DwightMunson1
        Qrew Assistant Captain
        You can check if any pipelines touch the app by going to the app settings and then to Connection Central under the Advanced Features. 

        This will only tell you if any touch the app though. For any details you would have to check the actual pipelines. 

        I keep these details in an app for easy reference.

        ------------------------------
        Dwight Munson
        ------------------------------