fiogf49gjkf0d Hi
i have a lookup to a view, which returns data in columns
if i add prefilter via property i.e. warehouse=BB it works
but i need the warehouse to equal a value from a field i.e. txtWH.Text
so on the onload event tried:
lkpProduct.LookupPreFilters.Clear();
Sage.SalesLogix.HighLevelTypes.LookupPreFilter filter = new Sage.SalesLogix.HighLevelTypes.LookupPreFilter();
filter.LookupEntityName = "Dclprodservices";
filter.PropertyName = "Warehousecode";
filter.CondOperator = "Equal";
filter.PropertyType = "System.String";
//filter.FilterValue = "'" + txtWH.Text+"'";
filter.FilterValue = "'BB'";
//filter.FilterValue = "string.Format('{0}',txtWh.Text)";
lkpProduct.LookupPreFilters.Add(filter);
lkpProduct.InitializeLookup = true;
or
Sage.SalesLogix.Web.Controls.Lookup.LookupControl l = new Sage.SalesLogix.Web.Controls.Lookup.LookupControl();
l = (Sage.SalesLogix.Web.Controls.Lookup.LookupControl)lkpProduct;
l.LookupExclusions = new string[] { string.Empty };
l.LookupPreFilters.Clear();
Sage.SalesLogix.HighLevelTypes.LookupPreFilter lookupFilter = new Sage.SalesLogix.HighLevelTypes.LookupPreFilter();
lookupFilter.CondOperator = "Equals";
lookupFilter.FilterValue = "'BB'";
lookupFilter.LookupEntityName = "Sage.Entity.Interfaces.Dclprodservices";
lookupFilter.PropertyName = "Warehousecode";
lookupFilter.PropertyType = "System.string";
l.LookupPreFilters.Add(lookupFilter);
l.InitializeLookup = true;
hardcoding it to BB for now but doesn’t filter by BB and brings no data back at all(yes have warehouses=BB!)
can anyone help please - pulling hair out at mo...
also rather than hardcode if wanted field value inside the property section of AA is it filtervalue ="'" + txtWH.Text+"'" ??
ta |