Need help with custom Label

I currently have 3sheets
List of Restaurants
Food entries that the Restaurant Sells a
Food Types Categories (Appetizers, Entrees, etc)

All Food has a Type
I have a relationship between Restaurant and Food Entries, where I have already figured out how many of each Food Type a restaurant has. However, I want to be able to turn those into a Dynamic Label for a List Filter.

Meaning the Filter could look like
Appetizers (2), Entrees (3), Desserts (1)
Appetizers (1), Entrees (4), Drinks (2)

Depending on what each restaurant has.

In my Food Category Sheet, I’ve only been able to figure out how to roll up the total # of Food entries for each Food Category, but unable to split them across each Restaurant. I’m thinking that it needs to be done here as this is the sheet my List Filter is using and only allows other columns from this sheet to be used as an alternative label.

Any help would be appreciated!

How do you select a restaurant? I’m assuming you select a restaurant first, and on the details screen you have the filter and the list of food items?

1 Like

So I assume you don’t have a sheet where the structure looks like.

Restaurant Food Type
Restaurant 1 Type 1
Restaurant 2 Type 1
Restaurant 2 Type 2

On my restaurant list I do have Food Types Sold as an Array. Are you thinking that I should use that column as my filter?

Yes, thats correct. I had a separate sheet with just a list of food types. Thinking using an areay of food types sold should be used as my list so I can grab another template column as my labels.

Right now its a detailed page on Restaurant Sheet where I have an Inline list for Food Rel, which shows all food items the Restaurant Sells. I then use a Food Type Filter to only show Type 1 Food, etc.
Looking for that filter, which currently says “Type 1” to reflect Type 1 (# of Food items for this restaurant), to basically indicate if there is anything in there or not. I do want to show even if empty as people can still add items. More of a UX thing so if its too complicated, its might not be worth it lol.

Restaurant Sheet

Restaurant       Food Type                 Food Rel
Name             Type 1, Type 2, Type 3    Food Names
Name             Type 2, Type 3, Type 4    Food Names

Food Sheet

Food Name       Restaurant Name   Food Type 
Name            Name              Type 1
Name            Name              Type 2

Food Type Sheet

Type Name
Type 1
Type 2
Type 3

So here is what I would do.

  • First I would create a new table.
  • Add one row to that table.
  • Then add a user specific text column which will hold the restaurant ID or Name.
  • Change your tab to use this new table as the source instead of the restaurant table.
  • Change the tab to a Details style layout instead of a list style layout. Remove any components on the screen and add an inline list that will be sourced from the restaurant table.
  • Now in your restaurant table, add a single value column. Point it to the new table, and select Whole Row.
  • On the inline list of restaurants, change the action to a custom action. First add an action that sets the selected restaurant in the new table through the Single Value column. Follow that action by another action to Show Detail Screen. What should happen is whenever you select a restaurant, it will write the selected restaurant ID or Name to the new table.
  • With the value set in the new table, create a single value column in the Food Type table.
  • Create a template column that joins the restaurant and food type together in the food type table.
  • Create a similar template column in the Food table.
  • Back in the Food Type table, create a multiple relation that links the template column to the template column in the Food table.
  • Create a Rollup column that gets a count of rows from the relation.
  • Finally create a template column that joins the Food Type and the rollup count as one value.
1 Like

Wow, thank you! Ill try it out and report back to you! Now I know why I couldn’t figure it out :rofl:

1 Like