on 05-03-2013 3:48 AM
Hi,
I'm having a challenge reading the Rfx Response Question tab by scripts. Currently I'm using the getCollectionMetadata() method to read the Rfx Response collection table & did not find a collection name which holds the question & the answer for specific question section name.
For example :-
If I want to read all question & answers mapped under Question section name BCM(as attached). How do I have to read using scripts?
Below is the code snippet
collnMetaData = doc.getCollectionMetadata("COLLN:1:905"); // this will give me handle to Rfx Response obj
if(hasValue(collnMetaData)) {
collnMetaDoc = collnMetaData.get(doc); // this will give me handle to Rfx Response Ibean collection doc obj
if(hasValue(collnMetaDoc)) {
collnMetaItr = collnMetaDoc.iterator();
while(collnMetaItr.hasNext()) {
rfxResponseDocRef= collnMetaItr.next(); // this will give me instance of Rfx response Ibean doc obj
rfxRespDocList = rfxResponseDocRef.getResponseDocList(); // this will give me the list of questions associated with Rfx response
printLogMessage(CAQMSG+" Response Doc Ref List - "+(rfxRespDocList),"1");
printLogMessage(CAQMSG+" Response Doc Ref List Size - "+(rfxRespDocList.size()),"1");
printLogMessage(CAQMSG+" Response Doc Ref List Index 1 - "+(rfxRespDocList.get(0)),"1"); // this will just give me the first question section i.e. BCM. The console printed Attribute property as [Not fetched]
}
}
}
Please advise accordingly!
Regards,
Vinod
Hi Vinod,
I am not sure whether you can fetch the questions from Question tab of RFx Responses as they are written as free texts. You can use query to fetch the value of scores,
you can use this script to get the question ...
AssociativeCollectionIfc rfxResponseColl = doc.getProposals();//gives RFx response collections
for(int j=0; j<rfxResponseColl.size();j++)
{
RfxResponseDocIBeanIfc rfxResponse = (RfxResponseDocIBeanIfc) rfxResponseColl.get(j);
OrderedSubordinateCollectionIfc rfxResponseQuestions = rfxResponse.getResponseDocList();//gives list of questions
for(int i=0; i<rfxResponseQuestions.size();i++)
{
FreetextValueIBeanIfc responseQuestion = (FreetextValueIBeanIfc) rfxResponseQuestions.get(i);//will give you the question
}
}
Not sure though whether this will work or not as I was not able to find API for questions...
If it helps,
Regards,
Kumud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.