Forum
TF Content: Category column displays Category ID instead of Category name
- TF Content
Steps to Reproduce:
Create a Content App
Create a Column type Category
In the Content App, create a new record
For the Category column, select a category
Create a frontend Menu item: View Records
Visit the page, click on the new record
Expected:
The name of Category is displayed on the new record's page
Result:
The Category's ID number is displayed
Hello
In the database, category ID is stored. So it is displaying the category ID.
There are couple of things to do to solve this:
First, category title needs to be fetched from categories table. For this navigate to the "Item View" Options of the Content App. Under Join Table tab, add:
- Database Table: categories
- As: b (Or any other alias)
- On 1: a.<column_name> (Column name used to store category)
- On 2: b.id
- Select Fields: b.title AS category_title
Then, need to map category field with category title. Edit the category column. Under "Display Options", enable the Related Field (first setting). In the Related Column, enter category_title
Let me know if this works.