Calculated Filenames

  • Posts: 2
  • Thank you received: 0

Calculated Filenames was created by Leon

Need help in placing calculation inside a dynamic filename.

Leon
4 years 7 months ago #14971

Please Log in or Create an account to join the conversation.

  • Posts: 87
  • Karma: 9
  • Thank you received: 15

Replied by KevinJohn on topic Calculated Filenames

Yes, we can use calculated filenames by placing calculation or expression inside a { } (open/close brackets). Only one pair of brackets are allowed though.

Examples

(1)

C:\Data{GetSystemDate('YYYYMMDD')}.vis


(2)

<CommonDocumentsDir>\DBSL\{GetSystemVariable('SOURCE_FILE_NAME')}.txt




Note: <CommonDocumentsDir> is a variable and will be replaced with actual value before execution

(3)

This calculation will create new file every time [F001] is changed.

C:\Data{GetVariable('<file_name>')}.vis

begin
if GetVariable('<file_name>')<>[F001] then record changed
begin
SetVariable('<file_name>',[F001]);
SourceChanged; creating new file
end;
Result:='test';
end;


.
4 years 7 months ago #14972

Please Log in or Create an account to join the conversation.

This site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies