Skip to main content
12-Amethyst
September 13, 2023
Solved

How to keep properties order from DataShape in Service result.

  • September 13, 2023
  • 1 reply
  • 1454 views

I have a problem with the fact that I cannot maintain the order of Data Shape properties in the service.
For example
Date Shape:

ID
PartName
PartNumber
ChildEqID
SomeName

When I check what the list of properties returned by the service as an infotable in All Data looks like, I see this:

ChildEQID
ID
PartName
PartNumber
SomeName

How to keep the service result in exactly the same order as in DataShape

I need this order to generate an excel report

 

 

Best answer by Velkumar

Hi @JK_10565232 

 

Use this arrow in DataShape FieldDefinition to set the order of fields. In the backend, it will set an ordinal number for fields

Velkumar_0-1694607068068.png

Velkumar_1-1694607102493.png

 

Here I moved hasChildren field to position 1 

Velkumar_2-1694607145487.png

Velkumar_3-1694607163226.png

 

/VR

 

 

 

 

 

 

 

1 reply

Velkumar19-TanzaniteAnswer
19-Tanzanite
September 13, 2023

Hi @JK_10565232 

 

Use this arrow in DataShape FieldDefinition to set the order of fields. In the backend, it will set an ordinal number for fields

Velkumar_0-1694607068068.png

Velkumar_1-1694607102493.png

 

Here I moved hasChildren field to position 1 

Velkumar_2-1694607145487.png

Velkumar_3-1694607163226.png

 

/VR

 

 

 

 

 

 

 

12-Amethyst
September 13, 2023

HI Velkumar,

 

Could you create service with infotable like Output. Please set you data shape for this infotable. Please create test mashup where you will try to call this service and check properties order for this output infotable. 

I had Data Shape like this:

JK_10565232_0-1694607518376.png

on Mashup side it looks like this:

JK_10565232_1-1694607594682.png

 


the question is how can I keep the same order on mashup side?

19-Tanzanite
September 13, 2023

Hi @JK_10565232 

 

In Mashup DesignTime, field names will be sorted alphabetically. We don't have control over that.

 

It just makes mapping easier during design time it doesn't impact Mashup Runtime sorting.

 

/VR