You can define in memory table variable, any table which includes Text250 column (T15 G/L Account having Totalling Text250 column will do), insert your text into that field, insert the record, set the 'like' filter on the text field and use any of FIND* functions.
TempGLAcc."Totalling" := MyText;
TempGLAcc.INSERT;
TempGLAcc.SETFILER("Totalling", 'Test*ing');
result := TempGLAcc.FINDFIRST;
The limitation is obvious - you can only compare texts up to 250 character long
'Non C/AL':
Use the .NET System.Text.RegularExpressions.Regex ? (Never tried it myself)
You can define in memory table variable, any table which includes Text250 column (T15 G/L Account having Totalling Text250 column will do), insert your text into that field, insert the record, set the 'like' filter on the text field and use any of FIND* functions.
TempGLAcc."Totalling" := MyText;
TempGLAcc.INSERT;
TempGLAcc.SETFILER("Totalling", 'Test*ing');
result := TempGLAcc.FINDFIRST;
The limitation is obvious - you can only compare texts up to 250 character long
'Non C/AL':
Use the .NET System.Text.RegularExpressions.Regex ? (Never tried it myself)
Answers
C/AL way (works in all NAV versions):
You can define in memory table variable, any table which includes Text250 column (T15 G/L Account having Totalling Text250 column will do), insert your text into that field, insert the record, set the 'like' filter on the text field and use any of FIND* functions.
The limitation is obvious - you can only compare texts up to 250 character long
'Non C/AL':
Use the .NET System.Text.RegularExpressions.Regex ? (Never tried it myself)
Slawek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
thanks. I will try it with RegEx as I dislike the 250 character limitation on the other solution.