Hi I am stuck in an issue, I am trying to apply SetFilter function on the item record to search this item with name: DS-2CD2132F-IW(4MM).
When i apply filter on it, the text looks like @*DS-2CD2132F-IW(4MM)*. The setfilter function throws exception because the length of No. field in item table is Code[20] and the search text length become 22.
The code is here.
searchTxt := StrSubstNo('@*%1*', itemNo);
itemRec.SetFilter("No.",'%1', searchTxt);
if itemRec.FindSet() then begin
UnitPrice := itemRec."Unit Price";
end
I get this exception: The length of the string is 22, but it must be less than or equal to 20 characters. Value: @*DS-2CD2132F-IW(4MM)*
I am interested to apply the filter whatever the length of the field in table is.
How can i solve this issue to filter the record?