These docs are for v20.3.44. Click to read the latest docs for v20.3.186.

Discussions

Ask a Question
Back to All

Standalone table - POST - new ordinal

Hi,

in iMIS 20.3, we have a standalone table Psc_Standalone setup. Is there a way to get the new ordinal number of an inserted record during a POST?

Body looks like:
{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "Psc_Standalone",
"PrimaryParentEntityTypeName": "Standalone",
"Identity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "Psc_Standalone",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib", "$values": [ "" ] } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Standalone", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib",
"$values": [
""
]
}
},
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "SessionID",
"Value": "101"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "TableID",
"Value": "401"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "EventKey",
"Value": "ANNA404"
}
]
}
}

Response from RestFul API looks like:
{
"$type": "Asi.Soa.Core.DataContracts.GenericEntityData, Asi.Contracts",
"EntityTypeName": "Psc_Standalone",
"PrimaryParentEntityTypeName": "Standalone",
"Identity": {
"$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts",
"EntityTypeName": "Psc_Standalone",
"IdentityElements": {
"$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib", "$values": [ "0" ] } }, "PrimaryParentIdentity": { "$type": "Asi.Soa.Core.DataContracts.IdentityData, Asi.Contracts", "EntityTypeName": "Standalone", "IdentityElements": { "$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib",
"$values": [
"0"
]
}
},
"Properties": {
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyDataCollection, Asi.Contracts",
"$values": [
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "Ordinal",
"Value": {
"$type": "System.Int32",
"$value": 0
}
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "SessionID",
"Value": "101"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "TableID",
"Value": "401"
},
{
"$type": "Asi.Soa.Core.DataContracts.GenericPropertyData, Asi.Contracts",
"Name": "EventKey",
"Value": "ANNA404"
}
]
}
}

The response returned "0" as ordinal value. Am I missing something?

Thank you for your advice.

Kind regards,
Bilal