โœ… Check List: When to Use REF vs ENUM BaseType REF

 

โœ… Check List: When to Use REF vs ENUM BaseType REF

๐Ÿง  โ€œA real-world checklist for app performance and architectureโ€

Hi everyone,

I've been experimenting with AppSheet at scale, optimizing my apps for performance across multiple modules, and Iโ€™ve been questioning one core concept:

Should I always use REF columns, or are there cases where ENUM with BaseType REF is better?

Let me say this upfront โ€” I'm not here to go against the tide. I'm here to bring data, testing, and real-life comparison to the table.

So I created this checklist to help choose intentionally, not blindly.


โœ… Checklist: When to Use REF or ENUM REF

๐Ÿ“Œ 1. Do you use the [Related_*] virtual column?

  • โœ… Yes โ†’ Use REF

  • โŒ No โ†’ Consider ENUM REF

That virtual column recalculates every sync โ€” powerful if used, wasteful if ignored.


๐Ÿ“Œ 2. Do you want automatic navigation, inline views, and system-generated actions?

  • โœ… Yes โ†’ REF will make your life easier

  • โŒ No, I prefer full manual control โ†’ ENUM REF is fine

AppSheet gives you free UX enhancements with REF. ENUM REF requires extra work.


๐Ÿ“Œ 3. Do you have thousands of rows and slow syncs?

  • โœ… Yes โ†’ ENUM REF can drastically improve sync speed

  • โŒ No โ†’ REF is fine

REF adds hidden cost during sync via [Related_*] recalculations.


๐Ÿ“Œ 4. Do you need IsPartOf or cascading delete?

  • โœ… Yes โ†’ Stick with REF

  • โŒ No โ†’ You can replace it with bots when using ENUM REF


๐Ÿ“Œ 5. Do you need multiple "parent" relationships?

  • โœ… Yes โ†’ ENUM REF allows much more flexible modeling

  • โŒ No, it's a classic one-to-many โ†’ REF is cleaner


๐Ÿ“Œ 6. Are you frequently dereferencing like [RefCol].[Name]?

  • โœ… Yes โ†’ REF is more efficient and native

  • โŒ No โ†’ ENUM REF works fine for structure only


๐Ÿ“Œ 7. Is the table read-only in this app?

  • โœ… Yes โ†’ ENUM REF is usually the smarter choice

  • โŒ No โ†’ Weigh the other points carefully


๐Ÿ“Œ 8. Are you willing to manually manage what AppSheet would auto-generate?

  • โœ… Yes โ†’ Go with ENUM REF for full control

  • โŒ No โ†’ Use REF and let the platform help you


๐Ÿ“Š Summary Table

Situation Use REF โœ… Use ENUM REF โœ…
Need [Related_*] โœ… โŒ
Use inline views / system actions โœ… โŒ
Use IsPartOf / cascading delete โœ… โŒ (requires bots)
Optimize sync performance โŒ โœ…
Table is read-only in this app ๐Ÿ”ถ โœ…
One parent only โœ… ๐Ÿ”ถ
Multi-parent model ๐Ÿ”ถ โœ…
App has low row count โœ… โŒ (not worth it)

 

โš ๏ธ [Follow-up] Dropdown Performance: REF vs ENUM BaseType REF in Real Time UX

What would be the UX?

The user's experience when interacting with dropdowns (especially in forms).

Letโ€™s get into it. ๐ŸŽฏ


๐Ÿง  What happens when a user clicks on a dropdown?

๐Ÿ”น Case A: Using a REF column

  • The reference table is pre-loaded during the sync.

  • If thereโ€™s no Valid If, AppSheet just displays the full list โ€” super fast.

  • If there is a Valid If, itโ€™s evaluated at click time, but:

    • If it's simple ([Active]=TRUE), it's instant.

    • If it's complex (FILTER(...) or SELECT(...)), it may introduce a slight delay.

  • โœ… The best practice: use a slice as the source โ€” the filtering is done once at sync, and then it loads instantly in the dropdown.

โœ… Result: Lightning-fast dropdown, even with lots of rows.


๐Ÿ”ธ Case B: Using an ENUM with BaseType REF

  • You must define a Valid If with a formula like:

    FILTER("Products", [Active] = TRUE)
    
  • That formula is evaluated every single time the dropdown is opened.

  • Even if the data is synced, AppSheet treats it like a regular expression โ€” it doesnโ€™t know it's part of a structural relationship.

  • So:

    • With a short list: all good.

    • With hundreds or thousands of rows: ๐Ÿ˜ฌ noticeable lag.

    • Every dropdown click = new calculation.

โŒ Result: Smooth syncโ€ฆ but UX latency at click time, especially with large datasets or complex filters.


โš–๏ธ Comparison Table

Feature REF ENUM BaseType REF
Data preloaded โœ… Yes โŒ No
Response on dropdown click โœ… Fast (especially with slice) โŒ Can lag
Calculation reuse โœ… Slice is preprocessed โŒ Re-evaluated each time
Sync speed โŒ Heavier โœ… Light & fast
Best for large tables โœ… With slices โŒ Risky for UX
Best for read-only apps โŒ Unnecessary โœ… Excellent choice

๐Ÿ”ง Pro Tip: Best of Both Worlds

If you're feeling bold, try this hybrid pattern:

  • Create a hidden REF column linked to a filtered slice for fast selection.

  • Use a visible Text or Enum field to store the selected value.

  • Populate it from the REF via an action or Initial Value logic.

This gives you fast dropdown performance while avoiding structural overhead.


๐Ÿงญ Final Note

This is not about REF vs ENUM REF.
This is about architecture vs automation.
If you're intentional, both tools are great โ€” as long as you take full ownership of the tradeoffs.

๐Ÿ“Œ In my case, Iโ€™ve decided to test both side by side โ€” building mirror apps โ€” to really feel the difference between sync time and click latency.

๐Ÿ‘‰ Feel free to try the checklist above on your own builds, and let me know how it works for you.

Absolutely, Gustavo. Here's your post translated and polished for the AppSheet Community โ€“ Tips & Tricks section, perfectly aligned to follow up your earlier article. You can copy-paste it right away.

This isnโ€™t just about performance โ€” itโ€™s about UX quality at the field level.

๐Ÿ“Œ So if your field lives in a form and points to lots of rows, use a REF with a pre-filtered slice.
๐Ÿ“Œ If itโ€™s used in read-only contexts or light apps โ€” ENUM REF still shines.

Just keep this in mind:

โฑ๏ธ A slow sync is annoying,
๐Ÿ–ฑ๏ธ But a laggy click breaks flow.

I hope this helps you take one more step toward clean, scalable apps.
Thanks again for all the discussions that fuel this thinking โ€” Iโ€™ll keep testing and sharing!

Letโ€™s elevate the way we architect in AppSheet.
Thanks for reading!

โ€” Gustavo๐Ÿ’ก

9 2 210
2 REPLIES 2

very useful tip. Thanks for sharing and thumbs up for your effort put into this ๐Ÿ‘

Thank you so much for your comment @jyothis_m . We all grow together here!

Top Labels in this Space