Im unsure on arcgis online, true is i never use it as we tend to develop inhouse and we have a esri uk product that is based on the JSAPI so im unsure on what is being done in the code.Could you not do something like this?
//define a popup template
var popupTemplate = new esri.dijit.PopupTemplate({
title: "{AId}",
fieldInfos: [
{fieldName: "AEID", visible: true, label:"EID"},
{fieldName: "AName", visible:true, label:"Name"},
{fieldName: "geoPoint.x", visible:true, label:"Xcoord"},
{fieldName: "geoPoint.y", visible:true, label:"Ycoord"},
{fieldName: "AIndex", visible:true, label:"AssetIndex"}
],
});
//create a feature layer based on the feature collection
var featureLayer = new esri.layers.FeatureLayer("YOUR SERVER HERE, CAN BE OTHER TYPES OF LAYERS", {
mode: esri.layers.FeatureLayer.MODE_SNAPSHOT, //DEPENDS WHAT YOU WANT? MIGHT NOT BE NEEDED AS A DYNAMIC SERVICE ETC
infoTemplate: popupTemplate,
outFields: ["*"]
});
If you could post some more code i will have a look.