Target¶
This document describes the metadata properties available to read an OData EntitySet. A Target entity can be used in many parts of a MDK application to specify an entity set to be retrieved. For example, a Target may define a query that is used to populate a list of items, or to provide the binding for a section inside a SectionedTable control. Either ReadLink or QueryOptions is required.
Target Properties¶
| Property | Type | Required | Default |
|---|---|---|---|
| EditLink | string |
No | |
| EntitySet | string |
Yes | |
| QueryOptions | string |
No | |
| ReadLink | string |
No | |
| ServerSidePaging | boolean |
No | false |
| Service | Service | Yes | |
| UniqueIdType | enum |
No |
EditLink¶
Entity's Edit Link. This is the entity ID path that uniquely identify the entity for editing e.g. Product(10235).
Currently, only Action.Type.OfflineOData.UndoPendingChanges support this property. This property can't be used
together with QueryOptions or ReadLink.
- type:
string
EntitySet¶
EntitySet name to use for this update entity operation
- type:
string
QueryOptions¶
String with query options like filter or Orderby to use to identify the entity. MUST resolve to a unique entity. Can't use together with ReadLink or EditLink.
- type:
string
ReadLink¶
Entity's Read Link. This is the entity ID path that uniquely identify the entity e.g. Product(10235). This property
can't be used together with QueryOptions or EditLink.
- type:
string
ServerSidePaging¶
A property to specify if the Target service supports pagination via skipToken. If this property is set to true, then QueryOptions should not contain 'skip' and 'top' for pagination to work.
- type:
boolean - default:
false
Service¶
The service to use for the update entity operation
- type: Service
UniqueIdType¶
This property is deprecated. Specifies the type of the Unique Id.
- type:
enum
The value of this property must be one of the known values listed below.
UniqueIdType Known Values¶
| Value | Description |
|---|---|
Integer |
|
String |
Examples¶
Target Object¶
{
"Target": {
"EntitySet": "Orders",
"Service": "/MDKOnline/Services/Online.service"
}
}
Target with Object Binding¶
// {Addresses} is a binding that'll return an array of objects
{
"Target": "{Addresses}"
}
// Complex type object binding with the use of array index that returns an object
{
"Target": "{Output/Roles/1}"
}
Target with TargetPath¶
// {Addresses} is a binding that returns an array of objects
{
"Target": "{Addresses}"
}
Target with ReadLink¶
{
"Target": {
"EntitySet": "WorkOrderHeader",
"Service": "/MyMDKApp/Services/MyOData.service",
"ReadLink": "{@odata.readLink}"
}
}
Target with EditLink¶
{
"Target": {
"EntitySet": "WorkOrderHeader",
"Service": "/MyMDKApp/Services/MyOData.service",
"EditLink": "{@odata.editLink}"
}
}
Target with ServerSidePaging¶
// Specify the service supports pagination via skiptoken by setting ServerSidePaging to true.
{
"Target": {
"EntitySet": "FeedEntries",
"Service": "/MDKOnline/Services/Jam.service",
"ServerSidePaging": true,
}
}
Escape TargetPath¶
// The string {#Control:Note/#Value} will be returned.
{
"Value": "`{#Control:Note/#Value}`"
}