cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

How to reorder fields in InfoTable

SathishkumarC
12-Amethyst

How to reorder fields in InfoTable

Hi,

 

I am trying to convert infotable data into JSON. The fields order available in InfoTable is not same in JSON string.

How to reorder the fields in InfoTable? Fields not follow the infotable order in JSON. How to resolve this?

 

My Infotable:

InfoTable.png

 

Converrted JSON:

{"rows":[{"Description":"Demo","AddedOn":1596949613100,"AddedBy":"Administrator","TemplateFile":"Report.xlsx","Template":"Report Demo"}],"dataShape":{"fieldDefinitions":{"Description":{"name":"Description","aspects":{"isPrimaryKey":false},"description":"","baseType":"STRING","ordinal":2},"AddedOn":{"name":"AddedOn","aspects":{"isPrimaryKey":false},"description":"","baseType":"DATETIME","ordinal":4},"AddedBy":{"name":"AddedBy","aspects":{"isPrimaryKey":false},"description":"","baseType":"STRING","ordinal":5},"TemplateFile":{"name":"TemplateFile","aspects":{"isPrimaryKey":false},"description":"","baseType":"STRING","ordinal":3},"Template":{"name":"Template","aspects":{"isPrimaryKey":true},"description":"","baseType":"STRING","ordinal":1}}}}
 
 
ACCEPTED SOLUTION

Accepted Solutions

Thanks for the response.

 

I got a solution with ordinal of the fields.

 

Regards,

Sathishkumar C.

View solution in original post

2 REPLIES 2

Hi,

 

You can sort the infotable using sort() function as below:

result.Sort({ name: "Name", ascending: true });

Thanks for the response.

 

I got a solution with ordinal of the fields.

 

Regards,

Sathishkumar C.

Announcements


Top Tags