Return the FOR expression of an order

     ORDFOR(<cOrderName> | <nOrder> [, <cOrderBagName>])
        --> cForExp


     <cOrderName> is the name of the target order whose cForExp is

     <nOrder> is an integer that identifies the position in the order
     list of the target order whose cForExp is sought.

     <cOrderBagName> is the name of an order bag containing one or more
     orders.  You may specify <cOrderBagName> as the file name with or
     without the path name or appropriate extension.  If you do not include
     the extension as part of <cOrderBagName>, Clipper uses the default
     extension of the current RDD.


     ORDFOR() returns a character expression, cForExp, that represents the
     FOR condition of the specified order.  If the order was not created
     using the FOR clause, the return value will be an empty string ("").  If
     the database driver does not support the FOR condition, it may either
     return an empty string ("") or raise an "unsupported function" error,
     depending on the driver.


     ORDFOR() is an order management function that returns the character
     string, cForExp, that represents the logical FOR condition of
     <cOrderName> or <nOrder>.

     Note:  ORDFOR(0) works as ORDFOR(INDEXORD()).


     .  This example retrieves the FOR condition from an order:

        USE Customer NEW
        INDEX ON  Customer->Acct   ;
           TO  Customer      ;
           FOR Customer->Acct > "AZZZZZ"

        ORDFOR("Customer")      // Returns: Customer->Acct > "AZZZZZ"



One response to “C5_ORDFOR

  1. Pingback: C5DG-3 RDD Reference | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.