A question came up on to how to use PreFilters on a dependency lookup to provide != functionality. No matter what was set as a conditional operator it seemed like it would return the list based on the condition ‘=’. The prefilters will work as long as as the operator was in the validation list. The following operators are allowed in dependency lookups. Note that the names are case sensitive when typing them in.

  • Starting with
  • Contains
  • Equal to
  • Not Equal to
  • Greater than
  • Greater than or Equal
  • Less than
  • Less than or Equal

with that in place the following code will work correctly in a Smart Part load action

dplArea.LookupPreFilters.Clear();

Sage.SalesLogix.HighLevelTypes.LookupPreFilter filter
    = new Sage.SalesLogix.HighLevelTypes.LookupPreFilter("Area", "Area 1");
filter.CondOperator = "Not Equal to";
dplArea.LookupPreFilters.Add(filter);

1 Comment

Leave a Reply