App ribbons are how Method Apps "talk" to one another – they display related information from a different app and serve as a shortcut directly to that information in the other app.
In the below example, we have created an app that keeps track of a contact's pets. We put into the Contact's app ribbon information about their pets!
The app ribbon on Bob's profile shows us he has three pets. Clicking the tile lists out all his pets. Clicking on a pet will take the Method user to the Pets App, specifically to the pet they clicked.
This is a perfect illustration of how app ribbons can leverage relationships between other apps, which helps streamline your Method experience and give you more control over the information you’re expressing in individual apps.
To illustrate how app ribbons work, we will go through the example displayed above.
How App Ribbons Work
In order for this app ribbon to function, a relationship between the Contacts table and the Pets table must already exist.
To get the pets to appear in the Contact's app ribbon, then the Pets Table must have a dropdown field of Contacts. Note in the below diagram, the Pets table (called eduPets) has a dropdown field called "Owner" which pulls from the Contacts Table.
The trickiest part of setting up an app ribbon is deciding which App to configure it! If you want activities to show up in the Contacts app ribbon, do you manage the Contacts App or the Pets App?
The answer is the Pets App. You will need to go into the manage screen of the Pets App and configure its records to show up in the Contacts app ribbon.
To clarify, if you want records to show up in an app ribbon, you do NOT configure the App that holds the app ribbon. It is configured in the App that manages the records.
Setting Up An App Ribbon
In the following example, we will show pets in the Contacts app ribbon.
Remember, eduPets is a custom table, and thus a custom app would have been created for it. If you are looking for either this table or this app, it won't exist in your account. This is only used as an example. Substitute mention of "Pets App" with your own app.
Create an App Ribbon
Click the vertical ellipsis (...) on the Pets App, and select Manage.
On the left menu, click App Ribbons
Click the box labeled Create App Ribbon.
This will take you to the New App Ribbon screen:
Step 1: Specify how this app’s base table relates to tables in other apps.
Show how the Pets table relates to the Contacts table.
eduPets Fields: Select the dropdown field which references the Contacts table. This was named 'Owner' in eduPets.
Join to Table: Since we want the pets to show up in the Contacts App, we will need to choose the base table of the Contacts App, which is the Contacts table.
The Join on field option is a bit more complex. Take a look at the below screenshot of our pets table: See how the Owner dropdown field connects to the Contacts table via the RecordID (which is in brackets). This is the field we are joining on. It is the field that joins the Pets table to the Contacts table.
Step 2. Set up what your ribbon tile will display.
In our example, we want the pets tile to display the number of pets the contact has. Value lets us choose how the number will be expressed – “Count” displays a total number of pets. In other cases we might choose Sum, Avg, Min or Max for other purposes.
Aggregate Field: this is the field we are calculating the value on. For a "count", the RecordID field is usually chosen.
The Caption is the title referencing what the number is displaying. Type “Pets” here since we are displaying the number of pets.
Step 3. Set the order and number of records to display.
The Sort by option identifies what field we can use to sort Bob’s pets – use Name
Order sorts by ascending or descending values.
Number of Records: how many records to display in the app ribbon
Step 4. Apply additional filtering.
This option allows you to filter the displayed records in more advanced ways. See the Criteria Builder for examples on how to use this.
When you’re finished with your changes, click Done to save or Cancel to delete the ribbon.