Hi all,
I have a problem to get all baseline for specfic project.
I have several baselines which are attached to different projects of a given product. Below, I managed to filter all the baselines of a given product but not of a project too. How can we filter by a product and a project please?
const char* product = "71_BWN00"; const char* project = "N6.LL"; PcmsObjStruct obj = { 0 }; obj.objType = PCMS_BASELINE; obj.noAttrs = 1; //obj.noAttrs = 2; obj.attrs = (PcmsObjAttrStruct*)PcmsEvntCalloc(sizeof(PcmsObjAttrStruct)); obj.attrs[0].attr = PCMS_ATTR_PRODUCT_ID; //obj.attrs[1].attr = PCMS_ATTR_PROJECT; PcmsSvaSetVal(obj.attrs[0].value, product, 0); //PcmsSvaSetVal(obj.attrs[1].value, project, 0); int noUids = 0; int* uids = NULL; if (PcmsQuery(conId, &obj, 0, &noUids, &uids) == PCMS_OK && noUids) { for (int i = 0; i < noUids; i ) { if (PcmsInitUid(conId, uids[i], PCMS_BASELINE, &obj) != PCMS_OK) continue; // use "obj" to get details of Product printf("%s \n", (_TCHAR*)obj.objId); } } PcmsObjFree(&obj); PcmsEvntFree(uids);