[SOLVED]
Hello, I encountered such problem, but in a little another key...
I need to show CONFIRM message, which contains filename with full path, e.g. 'Do you want to delete C:\folder\file.txt?'.
If I use something like this
IF CONFIRM(STRSUBSTNO(Text001,FileName)) THEN ...
where
Text001 TextConst 'Do you want to delete %1?'
FileName Text250
I get the following:
Do you want to delete C:
folder
file.txt?
I tried to use FORMAT(FileName), CONVERTSTR(FileName,'\',Character) where Character is Char and = '\'...
The result is the same...
Then I solved the problem by not using STRSUBSTNO in CONFIRM:
IF CONFIRM(Text001,TRUE,FileName) THEN...
It is hard to swim against self bloodstream... (c) Old, experienced kamikadze.
Comments
MESSAGE('This is a backslash:%1','\');
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
But my reall problem is how to filter with \ character in the filter string
IF I try: then the resulting message is:
Word1
Word2
rec.SETFILTER(SomeField,'%1','Word1\Word2');
MESSAGE(rec.GETFILTER(SomeField));
then the resulting message is:
Word1
Word2
This right b'coz ' 'Word1\Word2' is charecter constant
U have to write message as
MESSAGE('%1', rec.GETFILTER(SomeField));
Then try
MESSAGE('%1',rec.GETFILTER(SomeField)); instead of
MESSAGE(rec.GETFILTER(SomeField));
That MESSAGE(rec.GETFILTER(SomeField)); was just for testing...
The real problem was setting filter with \ character.
BTW, I used another filter (without \ character) that worked just as well.
Hello, I encountered such problem, but in a little another key...
I need to show CONFIRM message, which contains filename with full path, e.g. 'Do you want to delete C:\folder\file.txt?'.
If I use something like this where I get the following:
I tried to use FORMAT(FileName), CONVERTSTR(FileName,'\',Character) where Character is Char and = '\'...
The result is the same...
Then I solved the problem by not using STRSUBSTNO in CONFIRM: