I did the https://www.youtube.com/watch?v=4KfuGTxLQBo on how to deserialze json and render the values of objects in outsystem.
There is an issue, the customerdetails screen is not displaying the data. Not sure what went wrong.
Steps:
1- Got the Json file sample from JSON generator website
2- Created a excel file with 6 cells of each json object . quick question, the file i used is small , the way i did the excel is to split the json objects in excel cell and then imported to outsystems. is this best practice for larger json files?
3- imported the excel sheet (bootstrap) created an entity customer_data
4- created a the deserialization process, like below snapshot
5- The OML file is attached , you will notice that customer details page is not displaying data as expected!
I did the steps to the dot, not sure what is missing?
Hello Manah Hamadeh
I Checked you Oml File you attached, you made a small mistake while looping the records
Please see the below screenshots
Before: it means your code (its Mistake) here you are passing local variable to the loop
Correct: you need to pass record lost from the entity as shown below:
final output:
so please change it and its works fine :)
@Srinivas Singadi Appreciate it, if worked just fine.
I had one more question which was posted initially. Is it best practice to prepare the dataset manually by splitting the json objects and doing that manually, such as excel sheet importing it to outsystems.
In my case, I have a nested json objects within objects. In this case it will be more efficient if there is a method / solution to save json object as a dataset inorder to start extracting pair values in a record list.
would this be something duable? I saw few example where few extra steps were provided but it was not comprehensive. any ideas?
it's not good by doing it manually instead of that you can upload them directly from the browser(by upload widget)
and you can create the structure for your Json in OutSystems
after uploading the file you can convert it from excel to record list(str you created) then with the record list you can display it in UI
https://success.outsystems.com/Documentation/11/Reference/OutSystems_Language/Traditional_Web/Web_Logic_Tools/JSON_Deserialize
https://www.youtube.com/watch?v=4KfuGTxLQBo
have you checked this already?
apologies, changed the post, and looking to make more specific and clearer in my context. just to answer your question, I did the youtube part, which is really what my question is about. specifically, the data is not getting rendered.
First things first
1. First you need to convert JSON attach file into OutSystems object (use JSON deserialize)
2. In step two you have two ways
a. bulk insert into an entity
b.or loop through the record list you got from the JSON deserialize and insert it into an entity
I hope this helps you
apologies, changed the post, and looking to make more specific and clearer in my context. I did the deserialization as attached in OML file. added data to customerlist local variable , defined as customerlist. same issue.
If its solved your problem please mark as solution,
Thank you :)