Hi guys,
I have the following code on an XPage....
<xc:ccCalData xp:key="calData" lookupViewDataCol="3"
lookupViewName="luMonthView" lookupViewUNIDCol="4"
NoTooltipText="undefined" lookupAppType="5"
lookupViewToolTipCol="6">
</xc:ccCalData>
Then in custom control on this XPage I have a facet, doing the following code:
var luKey = luDay + "/" + luMonth + "/" + sessionScope.get("dispDate").getFullYear();
writeToLog("luKey: " + luKey);
var viewName = compositeData.lookupViewName;
var rawData = DbLookupArray(viewName,luKey,compositeData.lookupViewDataCol);
var docData = DbLookupArray(viewName,luKey,compositeData.lookupViewUNIDCol);
var toolTipData = DbLookupArray(viewName,luKey,compositeData.lookupViewToolTipCol);
var getAppType = DbLookupArray(viewName,luKey,compositeData.lookupAppType);
lukey, viewnName, rawData, docData and toolTipData all return values, however getAppType is returning 'Undefined' and I dont know why!
The lookupAppType is definitely in column 5 of my view, and has values when I view in the client - so I am not sure why all other values in the view are getting picked up, but this one is not?
The DBLookupArray code that it calls is:
function DbLookupArray(viewname, k, field) {
if (requestScope.get("dblookuparray-"+viewname+"-"+k+"-"+field)) {
/*writeToLog("ONE: " + viewname+"-"+k+"-"+field);*/
return requestScope.get("dblookuparray-"+viewname+"-"+k+"-"+field);
}
var r = @DbLookup("", viewname, k, field);
if (r && typeof r == "string") r = new Array(r);
if (r) requestScope.put("dblookuparray-"+viewname+"-"+k+"-"+field, r);
/*writeToLog("TWO: " + r);*/
return r;
}
Any idea's greatly appreciated as I am completely stuck!
Thanks