I reailize this is a very simple concept, but I am am not getting the expected results.
I have a method that searches a particular related record / field for a specific values. If the argument is true, I want to return a value. In the following method, I keep getting ‘3’, no matter what values are present or no values at all.
//Insertion Tube Repairs
elements.Order_Line_Items.setSelectedIndex(15|16)
if (orders_to_orderlineitems_byorderid.item_code == ‘F0108’,‘F0114’,‘F0206’,‘F0207’,‘F0208’,‘F0209’,‘F0260’,‘F0261’,‘F0294’,‘F0302’,‘F0303’,‘F0307’,‘F0363’,‘F0364’)
{
globals.Integer5 = 1;
}
//Light Guide Tube Replacement Validation
elements.Order_Line_Items.setSelectedIndex(17)
if (orders_to_orderlineitems_byorderid.item_code == ‘F0119’,‘F0280’,‘F0206’,‘F0123’)
{
globals.Integer5 = 2;
}
//Bending Section Rebuild Validation
elements.Order_Line_Items.setSelectedIndex(21)
if (orders_to_orderlineitems_byorderid.item_code == ‘F0226’,‘F0228’,‘F0229’,‘F0227’,‘F0169’,‘F0170’,‘F0173’, ‘F0172’)
{
globals.Integer5 = 3;
}
I am sure I am missing something regarding combining the selected index and the indexed record field (item_code), into a single statement , and run a “else if” statement.
Thanks for any help