| 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. |
| 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. |
Since you are new I suggest you go through the documentation or tutorials first. Click on the learn dropdown on this page above to get you started.
Am already passsed Static data & show in segment also. But i need to show that in dynamically by using service URL. That URL checked in mobile Fabric Console , fetch the respone. And how to convert that response to Array in JS.
@Emew Dwew ,
If your output params are well-defined,
You can use mappind editor to map your output and input parameters for your service invocation.
Define Action sequence when you want to invoke service and populate data on segment.
i.e button onclick or form preshow.
Use invoke Asynchronous service action and map input params from mapping editor.
In the callback, Drop Add Mapping and map the response to segment.
See the attached screenshot.
I have mapped output of my service to a label inside segment.
Populating a segment is fairly straight forward. Once you have your segment created with the appropriate corresponding labels, you could use something similar to the below code example:
integrationObj.invokeOperation(operationName, headers, data, operationSuccess, operationFailure); function operationSuccess(res){ //code for success call back self.view.segCommutes.widgetDataMap={lblDate:"Date", lblCommutes:"Commute"}; self.view.segCommutes.setData(res.Commutes); } function operationFailure(res){ //code for failure call back kony.application.dismissLoadingScreen(); alert("Unable to read from database."); }
First map the data to the segment labels and then set the data.
I hope this helps.
HI @Emew Dwew! Were you able to resolve this? If yes, please click [Select as Best] under the response that helped you the most. This will close out the post. Thanks!