on 05-29-2023 7:02 AM
Hi,
I have created an addon. In that I applied CFL button for vendor code. I want some specific list of vendors each time when I clicked on that button. So, I did by using condition(In ChooseFromListBefore event). But my CFL isn't getting filtered. if I tried by using only one value. like CardCode = ''V0121",then it's getting filtered. But for multiple value it's not working .Please help me with what's wrong in my code.(tried by using AND relationship also)?
Below is my code:
SAPbouiCOM.ChooseFromList ocfl1;
SAPbouiCOM.ChooseFromListCollection oCFL_collection1;
SAPbouiCOM.Conditions oCons = null;
SAPbouiCOM.Condition oCon;
oCFL_collection1 = oForm.ChooseFromLists;
ocfl1 = Application.SBO_Application.Forms.ActiveForm.ChooseFromLists.Item(EditText6.ChooseFromListUID);
ocfl1.SetConditions(oCons);
oCons = ocfl1.GetConditions();
string MQuery = @"call PL_SupplierCodeGSPO('" + EditText0.Value + "')";
oRset1.DoQuery(MQuery);
if (oRset1.RecordCount > 0){
for (int i = 0; i < oRset1.RecordCount; i++)
{
string Suppliercode = oRset1.Fields.Item(0).Value.ToString().Trim();
oCon = oCons.Add();
oCon.Alias = "CardCode";
// oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_OR;
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
oCon.CondVal = Suppliercode;
oRset1.MoveNext();
}
ocfl1.SetConditions(oCons);
}
Thanks!
User | Count |
---|---|
100 | |
8 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.