How to fetch data from response output in kony fabric to visualizer?

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

**Image removed for security reasons**I have a segment which has three labels who's id's are label1, label2, label3. And I have form named Form1 which has a flex container which has a segment in it.

Now how to get the data from fabric to app.

I tried some code but it's giving an Unhandled exception: Form1 is not defined.

**Image removed for security reasons**

What's wrong in my code? and what's the correct version of it?

Hi @Richvwd Gwvy​

Change "Form1.flexSegInfo.infoSegment.setData(productList);"

to "this.view.infoSegment.setData(productList);"

In Kony Reference Architecture we use "this.view" instead of formName.

Hi,

You have created the project using Kony Reference Architecture but accessing the form as in free form javascript application.

Instead of <formName>.<widgetName>.<method/Property> you need to use as this.view.<widgetName>.<method/Property>

Snippet:

this.view.segInfo.setData(<sample data>);

Please refer the Kony Reference Architecture Documentation below which will be very helpful

http://docs.kony.com/konylibrary/visualizer/kony_ref_arch_api/Default.htm

@Chloe Cvww​ Yes Now it working, but after loading I'm getting a blank page.

@Richvwd Gwvy​

Please check line 21.

It will be "response.length"

@Chloe Cvww​ yes sir, I actually already corrected that. But I'm getting a blank page. It it seen that it's loading but then its blank

@Richvwd Gwvy​

Either remove the segBasic variable or do it like this:-

successcallback: function(response){

productList = [];

for(i=0;i<response.length;i++)

{

temp = {

“label1”:response[I][‘titles’],

"label2”: response[I][‘pubDate’],

"label3”: response[I][‘titleDescription’],

}

productList.push(temp);

}

this.view.infoSegment.setData(productList)

}

@Chloe Cvww​ sir,

I'm still getting the same blank page. can you connect to laptop remotely using anyDesk and operate it?

@Richvwd Gwvy​

Can you show me what you are getting in response. ?