I want to display a Category Name instead of Category Key

Hello @LINK

I'm facing an issue with my app where I want to display the Category Name instead of the Category Key when adding a new expense record in a form. Here's what I have tried so far:

  1. Setup:

    • I have an Expenses table that references an Expense Categories table.
    • The Category column in the Expenses table is of type Ref, referencing the Expense Categories table.
    • The Category Name is set as the Label in the Expense Categories table.
  2. Issue:

    • When adding a new expense entry, the form and data source (Google Sheets) show the Category Key instead of the Category Name.
    • I followed the steps to set the Category Name as the label, but it still displays the key in the data source.
  3. What Iโ€™ve Tried:

    • Ensured the Ref column type is properly set.
    • Verified that the Category Name column is marked as the label in the Expense Categories table.
    • Regenerated the structure of the Expenses table after making changes.
    • Checked the App Formula and Initial Value fields to make sure nothing is overriding the display.
  4. Expected Behavior:

    • I want the Category Name (e.g., "Travel" or "Office Supplies") to be shown in both the form and in the data source instead of the Category Key (which is usually an ID).

Question: How can I ensure that the Category Name is displayed instead of the Category Key when entering a new expense? Is there a specific setting or approach I'm missing?

Any help or suggestions would be greatly appreciated!

Thank you!

0 2 126
2 REPLIES 2

Steve
Platinum 5
Platinum 5

@cgosilva wrote:

I want the Category Name (e.g., "Travel" or "Office Supplies") to be shown in both the form and in the data source instead of the Category Key (which is usually an ID).


Change the type of the Category column in the Expenses table to Text and set the column's Valid if expression to something like this:

SORT(
  Expense Categories[Category Name]
  + LIST([_THISROW_BEFORE].[Category])
  - LIST("")
)

It seems you want the category label and key to be the same.

In the "Expense Categories" table set the column [Category Name] to be they key and the label. 

This will ensure the [Category Name] "(e.g., "Travel" or "Office Supplies") to be shown in both the form and in the data source"

Top Labels in this Space