graph TD

  %% Definitions - Nodes
    %% Decisions
    A1["The LookML Validator is displaying the following error: Unknown or inaccessible field 'view_1.field_1' referenced in 'view_2.field_2'."]
    d1{"Do you need the view_2.field_2 field in the Explore that is triggering the error?"}
    d2{"Is there a 'fields' parameter in the Explore that does not include view_1.field_1?"}
       %% (If the Explore extends or is a refinement, be sure to check the base Explore as well.)
    d3{"Revalidate your LookML. Is the error still there?"}
    d4{"Revalidate your LookML. Is the error still there?"}
    d5{"Is view_1 joined in to the Explore?"}
        %% (Check for 'from' parameters in joins.)
        %% (If the Explore extends or is a refinement, be sure to check the base Explore as well.)
    d6{"Revalidate your LookML. Is the error still there?"}
    d7{"Is there a 'fields' parameter in the view_1 join that does not include field_1?"}
        %% (If the Explore extends or is a refinement, be sure to check the base Explore as well.)
    d8{"Revalidate your LookML. Is the error still there?"}
    d9{"Is there a field named field_1 in the view_1 definition?"}
        %% (Fields can be: dimensions dimension groups, filter-only fields or parameters.)
        %% (If the view extends or is a refinement, be sure to check the base view as well.)
    d10{"Revalidate your LookML. Is the error still there?"}
    d11{"Is the field named field_1 a dimension group of type: time?"}
    d12{"Revalidate your LookML. Is the error still there?"}

    %% Solutions
    A2["Navigate to the LookML definition for view_2.field_2 by clicking the link below the error message."]
    A3["If we can't exclude view_2.field_2, then we need to make sure that view_1.field_1 is a valid field that is available in this Explore."]
    A4["Add view_1.field_1 to the fields parameter at the Explore level."]
        %% (If it is being excluded using the -view_1.field_1 syntax, remove the -view_1.field_1 entry to add the field back to the Explore.)
    A5["Use the Explore-level fields parameter to exclude view_2.field_2 from the Explore."]
    A6["There may be another field in your Explore directly referencing view_2.field_2. You could look for these other fields and remove them as well. If there are many such fields, it may be easier to move to the next step instead."]
    A7["Add a join for view_1."]
        %%  (view_1 should be either the name of the join or in the from parameter of the join.)
    A8["Add view_1.field_1 to the fields parameter at the join level. Then revalidate."]
    A9["Add a dimension named field_1 to the view_1 definition."]
    A10["In the view_2.field_2 definition, append a timeframe to the view_1.field_1 reference."]
        %% (For example: view_1.field_1_date.)
    A11["Double check all of the steps in the process to see if there is anything you might have missed. If you are still unable to resolve the LookML reference error, reach out to Looker Support."]
    A12["You've resolved the LookML reference error!"]

  %% Graph Connections
    A1 --> A2
    A2 --> d1

    d1 -- Yes --> A3
    d1 -- No --> A5

    A3 --> d2

    d2 -- Yes --> A4
    d2 -- No --> d5

    A4 --> d3

    d3 -- No --> A12
    d3 -- Yes --> d5

    A5 --> d4

    d4 -- Yes --> A6
    d4 -- No --> A12

    A6 --> A3

    d5 -- Yes --> A7
    d5 -- No --> d7

    A7 --> d6

    d6 -- Yes --> d7
    d6 -- No --> A12

    d7 -- Yes --> A8
    d7 -- No --> d9

    A8 --> d8

    d8 -- Yes --> d9
    d8 -- No --> A12

    d9 -- Yes --> A9
    d9 -- No --> d11

    A9 --> d10

    d10 -- Yes --> d11
    d10 -- No --> A12

    d11 -- Yes --> A10
    d11 -- No --> A11

    A10 --> d12

    d12 -- Yes --> A11
    d12 -- No --> A12

  %% Styling
    classDef start fill:#C6DAF7,stroke:#000,stroke-width:2px,font-weight:normal,font-size:16px;
    class A1 start

    classDef decision fill:#D8EED8,stroke:#000,stroke-width:2px,font-weight:normal,font-size:16px;
    class d1,d2,d3,d2,d3,d6,d7,d4,d5,d6,d7,d8,d9,d10,d11,d12 decision

    classDef solution fill:#FEF6E0,stroke:#000,stroke-width:2px,font-weight:normal,font-size:16px;
    class A2,A3,A3,A4,A6,A5,A10,A11,A6,A7,A8,A9,A10 solution

    classDef support fill:#FCE0E0,stroke:#000,stroke-width:2px,font-weight:normal;
    class A11 support

    classDef resolved fill:#D8EED8,stroke:#000,stroke-width:2px,font-weight:normal,font-size:16px;
    class A12 decision

  %% Click events
    click d2 href "https://cloud.google.com/looker/docs/reference/param-explore-fields"
    click d5 href "https://cloud.google.com/looker/docs/reference/param-explore-join"
    click d7 href "https://cloud.google.com/looker/docs/reference/param-explore-join-fields"
    click d7 href "https://cloud.google.com/looker/docs/reference/param-explore-extends"
    click d7 href "https://cloud.google.com/looker/docs/lookml-refinements"
    click d11 href "https://cloud.google.com/looker/docs/reference/param-field-dimension-group"

    click A7 href "https://cloud.google.com/looker/docs/best-practices/error-unknown-or-inaccessible-field#join-the-missing-view"
    click A9 href "https://cloud.google.com/looker/docs/best-practices/error-unknown-or-inaccessible-field#option_1"
    click A10 href "https://cloud.google.com/looker/docs/best-practices/error-unknown-or-inaccessible-field#option_2"
    click A11 href "https://cloud.google.com/looker/docs/best-practices/looker-support-details"