Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Calculated Filenames

Calculated Filenames 3 years 5 months ago #14971

  • Leon
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 0
Need help in placing calculation inside a dynamic filename.

Leon

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

Calculated Filenames 3 years 5 months ago #14972

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;


.

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

  • Page:
  • 1

We have 184 guests and 2 members online