Hi 

i am facing one problem.i have country table in that table with help of JSON serializer i am getting below json data 

Archive.
JSONData
[{""Country"":{""Id"":1,""Name"":""United States Of America""}},{""Country"":{""Id"":3,""Name"":""India""}},{""Country"":{""Id"":5,""Name"":""Germany""}},{""Country"":{""Id"":7,""Name"":""Poland""}}]


and that json data i am storing in the database.after storing the data i have to show in aggregate.

like table format.

1    United State Of americal

2    India

but when i am trying to serialize the data then i am unable to show the data.is there any way to show this data with help of  JSON de serialize or ardojson.other wise i have to do with help of for loop.without forloop is it possible achieve?


any idea

Hi,

If you deserialize it to a list than you can bind the list to the Source Record List property of a List Records ot Table Records widget.

Regards,

Daniel

Daniël Kuhlmann wrote:i have done this.but i am getting blank data.i am unable to understand what i have done wrong.


If you deserialize it to a list than you can bind the list to the Source Record List property of a List Records ot Table Records widget.

Regards,

Daniel



Van you share oml file?

Daniël Kuhlmann wrote:Page name is archives.

Van you share oml file?



oml

Hi. Try deserializing to a List Record CountryRecord 

Gabriel

Gabriel Cardoso wrote:not clear.again i have to deseiralize country record

Hi. Try deserializing to a List Record CountryRecord 

Gabriel



Gabriel Cardoso wrote:can u please share your oml

Hi. Try deserializing to a List Record CountryRecord 

Gabriel



Absolutely. 

Hi. In your JSONDeserialize, you have CountryRecord List instead of CountryRecord Record List in the Data Type.

This is your a CountryRecord Record List 

"[{""Country"":{""Id"":1,""Name"":""United States Of America""}},{""Country"":{""Id"":3,""Name"":""India""}},{""Country"":{""Id"":5,""Name"":""Germany""}},{""Country"":{""Id"":7,""Name"":""Poland""}}]"

This is a CountryRecord List

"[{""Id"":1,""Name"":""United States Of America""},{""Id"":3,""Name"":""India""},{""Id"":5,""Name"":""Germany""},{""Id"":7,""Name"":""Poland""}]"


Gabriel

Hi Arkyadeep,

You are serializing the output of an Aggregate. Aggragates (and SQL queries) output a Record List. That basically means that each object in the List has an extra level, comparable to an ad-hoc Structure. You can see it in Gabriel's post above: there's a "Country" object that contains the content of a single record.

You can solve this in two ways:

  1. Instead of serializing the output of the GetCountry Aggregate, define a Local Variable of type List of CountryRecord, assign the output of the Aggregate to that Local Variable, and serialize that. This will remove the extra level of Country.
  2. Instead of deserializing into a CountryRecord List, deserialize into a CountryRecord Record List.

Either way, your solution is totally not scalable. The Filter on the GetArchives Aggregate uses a full table scan (because of the like) on a table with a 5000-character attribute. Once you've a considerable amount of data in there, it won't perform at all. So I think you have more problems than just (de)serializing some data.