Knowledge Base

    Other Expression in Appy Pie App Sheet feature

    ZA

    Priya Gautam

    31 min read

    Published on Date | Last updated on Date

    IF()

    The entire value (as specified) is returned by the IF function.
     
    Syntax
     
    IF(Condition, Then, Else)
     
    Example
     
    IF(EQUAL(['column_name1'], ['column_name2']),'true', 'false')
     
    IF(TRUE, "Yes!", "No!") : Yes!
     
    IF(FALSE, "Yes!", "No!") : No!
     
    IF(GREATERTHAN([1], [0]), "Yes!", "No!") : Yes!
     
    IF(ISBLANK(""), "Yes!", "No!") : Yes! See also: ISBLANK().

    Weekday or Weekend?

    IF(
      IN(
        WEEKDAY(TODAY()),
        LIST(1, 7)
      ),
      "It's the weekend!",
      "It's a weekday."
    )
     
    1.  LIST(1, 7) establishes a list of two numbers: 1 and 7.
    2.   IN(..., ...)  determines whether the computed weekday number is available in the constructed list.
    3. TODAY() generates today's date.
    4.  WEEKDAY(...) provides the weekday number of the given date, 1 to 7, where 1 represents Sunday and 7 represents Saturday.
    5. IF(..., "It's the weekend!", "It's a weekday") generates “It's the weekend!” if the weekday number is 1 or 7, or “It's a weekday” otherwise.
     
    Arguments

    • Condition: An expression that returns TRUE or FALSE.
    • Then : If the expression is true, then only evaluation is initiated.
    • Else : If the Then part is not satisfied, the expression is evaluated.

    Note: Results produced by both then and else should be of comparable types (e.g., both numeric, or both textual). The results obtained may be single values or lists.
     
    Return Value

    The result of evaluating then is returned if an expression is evaluated as TRUE; otherwise, the result of evaluating else is returned.

    Learn more about IF


    HERE

    The current location is provided by the HERE function.

    Syntax

    HERE()

    Example

    HERE() = Current Location.
     
    Return Value

    A LatLong value: the current location that the device reports.


    USERNAME

    The name of the current user is returned by the USERNAME function.

    Syntax
     
    USERNAME()

    Description

    The name of the current user is returned by USERNAME(). The services through which the user logs into the app is the source for obtaining the user name. The name is not available in case the user is not logged in. Not all authentication providers make the user's name available even for logged-in users.

    Return Value

    A Name value: current logged-in user’s name if provided by the authentication provider, or otherwise blank.


    USERMAIL
     
    The email address of the current user is returned by the USERMAIL function.
     
    Syntax

     
    USERMAIL()
     
    Example

     
    USERMAIL()
     
    Description
     
    The email address of the current user is returned by USERMAIL(). The availability of email addresses is only available for logged-in users.

    Return Value

    An Email value: the email address of the current user if the user is logged in, or blank if the user is not logged in.


    RANDBETWEEN
     

    A random integer between lower-bound and upper-bound is returned by the RANDBETWEEN function.
     
    Syntax

     
    RANDBETWEEN(lower-bound, upper-bound)
     
    Example

     
    RANDBETWEEN(10,15) = 12
     
    (RANDBETWEEN(0, 1) = 1) gives a random Yes/No value.
     
    (RANDBETWEEN(0, 100) / 100.0) gives a random Decimal value between 0.00 and 1.00 with two digits after the decimal point.
     
    Arguments

    * Upper-bound: This can be of any numeric type and is the highest random value that may be returned.
    * Lower-bound: This can be of any numeric type and is the lowest random value that may be returned.

    Return Value

    A Number value: a randomly selected integer not more than upper-bound and not less than lower-bound.
     
    Learn more about RANDBETWEEN


    UNIQUEID

    Any random value generated by the system is returned by the UNIQUEID function.

    Syntax
     

    UNIQUEID()

    Description

    A sequence of eight random digits and letters that are suitable for use as a unique identifier (such as a row key) is generated by the UNIQUEID(). The ID generated is not strictly unique but is sufficiently random so as to be effectively unique for all practical uses. The probability of generating a duplicate ID is virtually zero (just 1 in over 28 trillion).

    Return Value

    A Text value: a newly-generated pseudo-unique ID.

    Example
     
    UNIQUEID()


    LAT
     
    The latitude component of a location is returned by the LAT function.
     
    Syntax

     
    LAT([lat&long])
     
    Example
     

    LAT('42.3501, 24.8419')
     
    Description
     
    LAT() gets the latitude component of LatLong value (if available), or the first item in a 2-item list of any numeric type.
     
    Return Value
     
    A Decimal value: The latitude component of a LatLong value or the first element of a 2-item list of any numeric type, or else 0.


    LONG
     
    The longitude component of a location is returned by the LONG function.
     
    Syntax
     
    LONG([lat&long])
     
    Example
     
    LONG([lat&long])
     
    Description
     
    LONG() gets the longitude component of LatLong value (if available) or the second item in a 2-item list of any numeric type.

    Return Value

     A Decimal value: The longitude component of LatLong value or the second element of a 2-item list of any numeric type, or else 0.


    LATLONG
     
    A value composed of latitude and longitude is returned by the LATLONG function.
     
    Syntax

     
    LATLONG([lat],[long])
     
    Example

     
    LONG('42.3501, 24.8419')
     
    Description
     
    LATLONG() generates a LatLong value from latitude and longitude of any numeric type.
     
    Return Value

     
    A LatLong value: consisting of latitude and longitude.

    loading...

    Still can’t find an answer?

    Send us a ticket and we will get back to you.