Axure functions and variables

Source: Internet
Author: User

The variables in axurerp are a feature with unique personality and value. With the variables, many functional logics that require complex condition judgment or passing parameters can be designed and implemented, this greatly enriches the implementation effects of the prototype demonstration. Before axurerp version 6.0, only defined global variables can be used. In version 6.0, some axurerp built-in variables are added and the function operation function is added, I have already written two Tutorials: axurerp tutorial-use variables and axurerp tutorial-variable calculation. this article describes how to use global variables and how to perform variable operations before version 6.0.

For example, the left side is the axurerp variable, and the right side is the new function. It can be seen that axurerp has introduced conventional operations such as addition, subtraction, multiplication, division, and so on. Axurerp built-in variables are special variables that cannot be assigned values, or their values are default values assigned by the system. We only need to reference them when using them.

Pagename: the name of the returned page, which is the name of all pages in the site map panel. The call format is [[pagename].

Day: returns the date of the current system time. For example, "28" is returned on January 1, February 28. The call format is [Day].

Month: returns the month of the current system time. For example, "2" is returned on January 1, February 28. The call format is [month].

Monthname: returns the name of the month of the current system time. For example, if "February" is returned on January 1, February 28, the call format is [[monthname].

Dayofweek: returns the name of the day of the week of the current system time. For example, "Tuesday" is returned on January 1, February 28, 2012. The call format is [dayofweek].

Year: Year of the current system time. For example, 2012 is returned. The call format is [year].

Genday: returns the date of the prototype generation time. For example, if the prototype is generated on January 1, February 28, "28" is returned. The call format is [genday].

Genmonth: returns the month of the prototype generation time. For example, "2" is returned on January 1, February 28. The call format is [[genmonth].

Genmonthname: returns the name of the month when the prototype was generated. For example, if the prototype is generated on July 15, February 28, "July 22, February" is returned. The call format is [genmonthname].

Gendayofweek: returns the name of the day of the week when the prototype was generated. For example, on April 9, February 28, 2012, "Tuesday" is returned. The call format is [gendayofweek].

Genyear: returns the year of the prototype generation time. For example, the year 2012 is returned. The call format is [genyear].

The above is the usage instructions for all axurerp built-in variables. From the above, we can see that there is no difference in the prefix "gen", although there are differences between Chinese and English, I personally think this is related to the operating system version. If it is an English version of the operating system, it is estimated that the English version is displayed.

In addition to built-in variables, axurerp 6.0 also adds the local variable function. Compared with global variables, You can boast page calls. Local variables can only be called in a single event action, generally, local variables are used only for passing component values, and then the defined local variables are called in the function operation. We will discuss them as follows:

Next we will introduce the new function operation functions of axurerp. The addition, subtraction, multiplication, division, and Division operations are relatively simple. Everyone can understand what they mean.

+: Addition operation. Call format: [lvar1 + lvar2]

-: Subtraction operation, call format [LVAR1-LVAR2]

*: Multiplication operation. The call format is [[lvar1 * lvar2].

/: Division operation. The call format is [lvar1/lvar2].

Lvar. substring (from, to): truncates a string and returns the substring from the from bit to bit. The call format is [lvar. substring (from, to)]. To return the fourth to fourth characters of the local variable lvar1 = "12345", the value is [[lvar1.substring (2, 4)] = 34

Lvar. length: returns the length of the string. The call format is [lvar. length]. To return the length of the local variable lvar1 = "234", it is [[lvar1.length] = 3

Lvar. tofixed (decimalpoints): the exact number of decimal places. A string of the specified decimalpoints is returned. The call format is [lvar. tofixed (decimalpoints)]. To return the two decimal places of the local variable lvar1 = "12", [[lvar1.tofixed (2)] = 12.00

From the above function introduction, we can also see the usage features of local variables, which are generally used to pass values or parameters. For example, the content of the input box is first assigned to the local variables for calculation.

Axure functions and variables

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.