How can I get AppSheet to allow users to update a single field where main table is a view and links to updateable table?

Summary

The problem revolves around configuring AppSheet to allow users to update a single field in a table that is linked to a read-only BigQuery view. The main goal is to enable users to edit a comment field in the detail view of an AppSheet app, where the comment is sourced from a separate, updateable BigQuery table. The key challenge lies in establishing an editable link between the read-only view and the updateable table.

Root Cause

The root cause of the issue is that the field type in the view dataset is set to Ref with a formula, which makes it non-editable. The formula [project_month].[financials_comments] computes the value, and AppSheet does not allow editing of computed fields.

Why This Happens in Real Systems

This issue occurs in real systems due to the following reasons:

  • Complex data sources: Apps often draw data from multiple sources, including views and tables, which can have different permissions and update rules.
  • Computed fields: Using formulas to compute field values can lead to non-editable fields, as seen in this case.
  • Limited understanding of AppSheet capabilities: Users may not fully understand how to configure AppSheet to handle linked data sources and editable fields.

Real-World Impact

The impact of this issue includes:

  • Limited user functionality: Users cannot edit the comment field, which may be a critical requirement for the app.
  • Increased development time: Developers may spend significant time trying to resolve the issue, which can delay the app’s release.
  • Frustrated users: End-users may become frustrated if they cannot perform expected actions, leading to a poor user experience.

Example or Code

-- Example of creating a view in BigQuery
CREATE VIEW project_view AS
SELECT project_no, month, financials_comments
FROM project_table;

-- Example of creating a table in BigQuery
CREATE TABLE project_comments (
  project_no INTEGER,
  month STRING,
  comments STRING
);

How Senior Engineers Fix It

Senior engineers can fix this issue by:

  • Reconfiguring the field type: Change the field type from Ref to a different type that allows editing.
  • Using a slicer: Create a slicer to filter the updateable table and link it to the view.
  • Utilizing AppSheet’s data modeling capabilities: Leverage AppSheet’s features to model the data and establish an editable link between the view and the table.

Why Juniors Miss It

Junior engineers may miss this issue due to:

  • Lack of experience: Limited experience with AppSheet and BigQuery may lead to unfamiliarity with the platform’s capabilities and limitations.
  • Insufficient understanding of data modeling: Juniors may not fully comprehend how to model data in AppSheet and establish relationships between different data sources.
  • Overreliance on AI tools: Relying too heavily on AI tools for solutions may not provide a deep understanding of the underlying issues and how to resolve them.