Author Topic: Liquid UI - file command  (Read 2798 times)

Sai Siddhartha

  • GuiXT Forum
  • Newbie
  • *
  • Posts: 47
    • View Profile
Liquid UI - file command
« on: February 01, 2018, 06:27:07 AM »
Purpose:
The file command assigns short names - also called aliases - to scripts housed in a SAP web repository(SAPWR).

Usage:
This command is very useful since SAPWR set a limit of thirty characters on a filename. This syntax is as follows:
file("long_filename",{"alias":"short_filename"});
The file command is placed in the session.sjs file if such a file is present.

Options
The file command takes the following option:
alias - this is used to specify the short filename that will be used instead of original filename.
Syntax:
{"alias":"shortfilename"}

Assigning an alias:
The file command can be used with to assign aliases to files.
In the following example, we will assign an alias to a file SAPWR with a very long file name.
1.Create a file in SAPWR with the following filename:
        an_extremely_and_over_the_top_lengthy_script_filename.sjs
2.Open the 'esession.sjs' file and enter the following code. Create the file if it does not exist.
        file("an_extremely_and_over_the_top_lengthy_script_filename.sjs",{"alias":"longfile.sjs"});
3.Save the file.
4.You should now be able to access the file using alias instead of the actual file name.