on ‎2021 Mar 25 10:31 AM
Hi,
How to apply conditions to Item description field's CFL which is at row level? How can we get that cfl through coding? Actually what I'm trying to do. I am entering value in a UDF and based on that value I want to filter Item description CFL. For ex. UDF value = Copper Cable then CFL should display records( item name = Copper and cable).
My Conditons:
if (i == strlist.Length - 1) {
oCon = oCons.Add();
oCon.Alias = "ItemName";
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_CONTAIN;
oCon.CondVal = strlist[i];
} else {
oCon = oCons.Add();
oCon.Alias = "ItemName";
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_CONTAIN;
oCon.CondVal = strlist[i]; oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
}

Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi s_neha,
Below is a working sample. You need to change it as per your requirement:
if (ItemUid == "Search")
{
SAPbouiCOM.Form oForm = (SAPbouiCOM.Form)SBO_Application.Forms.GetForm("170", 1);
SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oForm.Items.Item("5").Specific;
string Str = oEdit.Value.Trim();
SAPbouiCOM.ChooseFromList oCFLEvento = default(SAPbouiCOM.ChooseFromList);
SAPbouiCOM.Condition oCon = default(SAPbouiCOM.Condition);
SAPbouiCOM.Conditions oCons = default(SAPbouiCOM.Conditions);
oCFLEvento = oForm.ChooseFromLists.Item("INV");
oCFLEvento.SetConditions(null);
oCons = oCFLEvento.GetConditions();
oCon = oCons.Add();
oCon.Alias = "CardCode";
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
oCon.CondVal = "" + Str + "";
oCon.Relationship = SAPbouiCOM.BoConditionRelationship.cr_AND;
oCon = oCons.Add();
oCon.Alias = "DocStatus";
oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
oCon.CondVal = "O";
oCFLEvento.SetConditions(oCons);
}
Hope it helps!
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 36 | |
| 27 | |
| 21 | |
| 4 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.