Create and edit fields for Common Data Service using Power Apps portal
The Power Apps portal provides an easy way to create and edit entity fields with the Common Data Service.
The portal enables configuring the most common options, but certain options can only be set using solution explorer.
- Create and edit fields for Common Data Service
- Create and edit fields for Common Data Service using Power Apps solution explorer
- From the Power Apps portal, select Data > Entities and select the entity that has the fields you want to view.
- With the Fields tab selected, you can select the following views:
|All||Shows all the fields for the entity|
|Managed||Shows only managed and standard fields for the entity|
|Custom||Shows only custom fields for the entity|
|Default||Shows only the standard fields for the entity|
Create a field
While viewing fields, in the command bar, select Add field which will show the Field properties panel.
Initially, just three field properties are available:
|Display Name||The text to be displayed for the field in the user interface.|
|Name||The unique name across your environment. A name will be generated for you based on the display name that you've entered, but you can edit it before saving. Once a field is created the name cannot be changed as it may be referenced in your applications or code. The name will have the customization prefix for your Common Data Service Default Publisher prepended to it.|
|Data type||Controls how values are stored as well as how they are formatted in some applications. Once a field is saved, you cannot change the data type with the exception of converting text fields to autonumber fields.|
|Required||A record can't be saved without data in this field. More information: Saving records programmatically for required fields|
|Searchable||This field appears in Advanced Find and is available when customizing views.|
|Calculated or Rollup||Use to automate manual calculations. Use values, dates, or text.|
|Advanced Options||Add a description, and specify a maximum length and IME mode for the field.|
You can set additional options depending on your choice of Data type.
Field Data types
There are many different types of fields, but you can only create some of them. For more information about all types of fields, see Types of fields and field data types.
When creating a field, Data type provides the following choices:
Standard text fields can store up to 4,000 characters. The default Max Length option is set to a lower value you can adjust.
|Text||A text value intended to be displayed in a single-line textbox.|
|Text Area||A text value intended to be displayed in a multi-line textbox. If you require more than 4,000 characters, use a Multiline Text data type.|
|A text value validated as an e-mail address and rendered as a mailto link in the field.|
|URL||A text value validated as a URL and rendered as a link to open the URL.|
|Ticker Symbol||A text value for a ticker symbol that will display a link that will open to show a quote for the stock ticker symbol.|
|Phone||A text value validated as a phone number rendered as link to initiate a phone call by using Skype.|
|Autonumber||A customizable combination of numbers and letters that is automatically generated by the server whenever the record is created. More information: Autonumber fields|
Fields that store text have an absolute maximum depending on the type. The Max Length option sets a value lower than the maximum specific to your environment. You can increase this max length but you should not lower it if you have data in the system that exceeds the lower value.
These fields store data as a number but include different presentation and validation options.
|Whole Number||A number value presented in a text box.|
|Duration||A number value presented as a drop-down list that contains time intervals. A user can select a value from the list or type an integer value that represents the number of minutes. The duration must be entered in the format: “x minutes”, “x hours” or “x days”. Hours and days can also be entered using decimals, for example, “x.x hours” or “x.x days”. The values entered must be expressible in minutes, sub-minute values will be rounded to the nearest minute.|
|Timezone||A number value presented as a drop-down list that contains a list of time zones.|
|Language||A number value presented as a drop-down list that contains a list of languages that have been enabled for the environment. If no other languages have been enabled, the base language will be the only option. The value saved is the Locale Identifier (LCID) value for the language.|
Use these fields to store time values. You can store values as early as 1/1/1753 12:00 AM.
|Date and Time||A date and time value.|
|Date Only||A date and time value that only displays a date. The time value is stored as 12:00 AM (00:00:00) in the system.|
You can also set specific Behavior for Date Time fields in the Advanced options.
- User local : Displays values converted to in the current user’s local time zone. This is the default for new fields.
- Date only: This behavior is available for the Date Only type. Displays values without time zone conversion. Use this for data like birthdays and anniversaries.
- Time zone independent: Displays values without time zone conversion.
More information: Behavior and format of the Date and Time field
Other Data types
|Currency||A money value for any currencies configured for the environment. You can set a level of precision or choose to base the precision on a specific currency or a single standard precision used by the organization.More information: Using currency fields|
|Decimal Number||A decimal value with up to 10 points of precision. More information: Using the right type of number|
|File||For storing binary data.|
|Floating Point Number||A floating point number with up to 5 points of precision. More information: Using the right type of number|
|Image||Displays a single image per record in the application. Each entity can have one image field. The Name you enter when creating an image field will be ignored. Image fields are always named 'EntityImage'.|
|Lookup||Creates a reference to a single record for a single target record type.|
|Multi Select Option Set||Displays a list of options where more than one can be selected.|
|Multiline Text||A text value intended to be displayed in a multi-line textbox. Limited to a maximum of 1,048,576 characters. You can also set a lower Max Length.|
|Option Set||Displays a list of options where only one can be selected.|
|Two Options||Displays two options where only one can be selected. You choose which labels are displayed for each option. The default values are Yes and No.|
Save new field
Once you have set the Display Name, Name and Data type properties you can select Done to close the Field properties panel.
You can continue to edit the entity and add additional fields or return and continue editing this field. The fields will not be created until you select Save Entity to save all the changes to the entity.
You can also select Discard to discard the changes you have made.
Edit a field
While viewing fields, select the field you want to edit. You can modify the Display Name but you cannot change the Name and Data type if you have saved changes to the entity to add the field.
Every field has the following properties you can change:
|Required||When this is selected a record can't be saved without data in this field. More information: Saving records programmatically for required fields|
|Searchable||De-select this for fields for the entity that you don’t use. When a field is searchable it appears in Advanced Find and is available when customizing views. De-selecting this will reduce the number of options shown to people using advanced find.|
|Description||Found within Advanced Options. Enter instructions to the user about what the field is for. These descriptions appear as tooltips for the user in model-driven apps when they hover their mouse over the label of the field.|
Making fields required: Be careful when you make fields required. People will resist using the application if they can’t save records because they lack the correct information to enter into a required field. People may enter incorrect data simply to save the record and get on with their work.
Set requirement dynamically: In model-driven apps you can use business rules or form scripts to change the requirement level as the data in the record changes as people work on it. More information: Create business rules and recommendations to apply logic in a form
Advanced Find availability: Advanced Find is currently only available for model-driven apps using the Web Client. Advanced find is not currently available in Unified Interface clients.
Saving records programmatically for required fields
When a record is saved programmatically using web services, only the SystemRequired fields are enforced. Failure to set a value for SystemRequired fields will return an error. You can’t set the SystemRequired level of requirement.
Setting a field to Business Required means that the default behavior of a model-driven or canvas app will enforce this requirement in the app. The request will not be sent to the service if the field has no value. The app user is shown an error and prompted to add data to the required field before they can save the record. There are options within the app to override this behavior and allow operation to proceed if needed.
Calculated or Rollup
You can set a custom field to be a Calculated or a Rollup field. Fields that are not calculated or rollup fields are sometimes referred to as simple fields.
With a calculated field you can enter a formula to assign a value to the field. These data types can be set to calculated fields: Currency, Date and Time, Date Only, Decimal Number, Duration, Email, Language, Multi Select Option Set, Option Set, Text, Text Area, Ticker Symbol, Timezone, Two Options, URL, and Whole Number.
More information: Define calculated fields to automate manual calculations
With a rollup field you can set aggregation functions that will run periodically to set a number value for the field. These data types can be set to calculated fields: Currency, Date and Time, Date Only, Decimal Number, Duration, Language, Timezone, and Whole Number.
More information: Define rollup fields that aggregate values
Number field options
Each type of number field has absolute minimum and maximum values. You can set appropriate Minimum value and Maximum value within these absolute values. Do this to have Common Data Service validate the values for the data you want to store in the field.
For Floating Point Number and Decimal Number data types, you can specify a number of Decimal places.
Option Set field options
Fields that provide a set of options can include their own set of local options or refer to a common set of global options that can be used by multiple fields.
Using a global option set is valuable when you find yourself creating the same set of options for multiple fields. With a global option set, you only need to maintain the set of options in one place.
When you choose Multi Select Option Set or Option Set data type the designer will list a set of available global option sets for you to choose from and provide the option to create a New option set.
If you choose New option set the default behavior is to create a new global option set.
While you are editing options for a new global option set, the Display name and Name values are for the global option set rather than for the field. The default values match the field values, but you can edit them while you edit the global option set to be different from the field you are currently creating.
If you want to create a local option set you must select View more and choose Local option set.
If you define every option set as a global option set your list of global option sets will grow and could be difficult to manage. If you know that the set of options will only be used in one place, use a local option set.
If you remove an option which has been used by an entity record the data for that record will become invalid after you save your changes to the global option set.
Before you remove an option that has been used, you should change the data in any entity record that uses that option to a valid value.
Delete a field
With the system administrator security role, you can delete any custom fields that aren’t part of a managed solution. When you delete a field, any data stored in the field is lost. The only way to recover data from a field that was deleted is to restore the database from a point before the field was deleted.
Before you can delete a custom field, you must remove any dependencies that may exist in other solution components.
While viewing fields, if you select a custom field that can be deleted in the list, the Delete field command appears and is enabled.
Use the Delete field command to delete the field. After deleting the field you must save the changes to the entity.
If you get an error related to dependencies, you must use solution explorer to detect dependencies. More information: Check field dependencies
IME (input method editor) mode specifies how a physical keyboard can be used to enter characters for text fields. IMEs are tools provided by the operating system for composing text. They are commonly used to enter Chinese, Japanese, and Korean words. IME mode does not restrict the characters that users can enter. For example, when IME mode is disabled, users can still enter Japanese characters by pasting in a text input.
IME Mode is used for backward compatibility with the legacy web client and the IME Mode settings described here don’t apply to Unified Interface apps. Additionally, IME mode is supported only in Internet Explorer and partially supported in Firefox.
- Active: This value will activate the IME initially. You can deactivate it later if desired. This is the default IME setting.
- Auto: When IME mode is auto, Power Apps will not interfere with the IME.
- Disabled: Disable IME mode to bypass the IME. This can be useful for entering alphanumeric characters in certain languages.
- Inactive: Power Apps will deactivate the IME initially. You can activate it later if desired.
Create and edit fields for Common Data Service
Create and edit fields for Common Data Service using Power Apps solution explorer
Types of fields and field data types
Define calculated fields to automate manual calculations
Define rollup fields that aggregate values
Behavior and format of the Date and Time field