Serge_G 87 Posted October 25, 2021 Hi, The goal, I have a text file with words and I want to export in a FDMemTable words with length between 4 and 12 ? I don't know how to get the value in onWriteRecord event, is there a way to ? I can get the value in the OnWriteValue one but fired after onWriteRecord it's unusefull. Any hints (not involving a localsql DELETE) Share this post Link to post
Serge_G 87 Posted October 25, 2021 OK, found it! I need mappings and then my "filter" works procedure TDataModule2.FDBatchMove1WriteRecord(ASender: TObject; var AAction: TFDBatchMoveAction); var m : String; begin AAction:=TFDBatchMoveAction.paInsert; m:=FDBatchmove1.Mappings[0].ItemValue; accept:=(Length(m)>=4) AND (Length(m)<=12); if not Accept then AAction:=TFDBatchMoveAction.paSkip; end; My file text need a first line =column definition. I just have an encoding problem to solve (attached my file) and as you can see on image I have some problems like these zygopétale, zygopétales liste_de_mots.francais.frgut.txt Share this post Link to post