Define alternate keys using Power Apps portal

Power Apps provides an easy way to view and create entity alternate keys with the Common Data Service. For more information about alternate keys, see Define alternate keys to reference records.

Power Apps enables configuring the most common options, but certain options can only be set using solution explorer. More information: Define alternate keys using solution explorer

Important

If the data within a field that is used in an alternate key will contain one of the following characters /,<,>,*,%,&,:,\\,? then GET or PATCH actions will not work. If you only need uniqueness then this approach will work, but if you need to use these keys as part of data integration then it is best to create the key on fields that won't have data with those characters.

View alternate keys

  1. From the Power Apps portal, select Data > Entities and select the entity that you want to view.

  2. Select Keys to view a list of any alternate keys that are defined.

    View alternate keys

Create an alternate key

  1. While viewing alternate keys, select Add key.

  2. Use the panel to set a Display name and choose the fields to use to create the alternate key.

    The Name field will be populated based on the display name.

    Example Alternate Key Definition

  3. Select Done to close the panel.

  4. Select Save Entity to create the alternate key.

Note

The alternate key will not be immediately available. A system job is initiated when you save the entity to create database indexes to support the alternate key.

Delete an alternate key

While viewing alternate keys, select the key you want to delete and choose Delete Key from the command bar.

See also

Developer Documentation: Work with alternate keys