How to get the comment defined in the header of an Object defined in an Adonix application?

By | December 1, 2017

You may have come across a situation where you want to returnreturns the comment defined in the header of the file for which the path is created with the various parameters passed.

Syntax:

filcom(directory, filnam, extens [, appli [,vol [,mach]]])

Example:
If the CLIENT table exists in the current application or in one of
its reference applications, display the comment of this table
If filinfo(filpath(“FIL”, “BPCUSTOMER”, “srf”, -1)) >= 0
Infbox filcom(“FIL”, “CLIENT”, “srf”, -1)
Endif

Description and Comments
The filcom function returns the comment defined in the header of the file for which the path is created with the various parameters passed. If no comment were defined, it returns the empty string. The file must exist.
The construction rules for the file path are the same as for the Filpath function. You will determine the following:
· The last three parameters are optional, since the others may be empty strings. The parameters that are too long will be truncated.
· Under Windows 95 and Windows NT, you may use the slash (/) instead of the backslash (\) in the directory and fil_nam.

· If the directory begins with an exclamation point (!), then Adonix ignores the appli parameter
· If the directory is the period (.), then Adonix creates a corresponding path beginning with period slash (./) and ignores the appli and vol parameters.

· If filnam begins with a slash (/), then Adonix creates an absolute path and ignores the appli and vol directory parameters
· If filnam contains a period (.) (i.e., is in the “A.B” format), then Adonix considers that the first part (“A”) is the application and the second (“B”) is a file of this application. Adonix does not then take the appli parameter into account.

· If appli has a positive value, Adonix considers that the file is in the reference application of ‘appli’ number.
· If the name of the application (or its number) is not specified, everything takes place as if it were worth -1
· If appli equals -1, the file is first searched for in the current application. If it is not found there, it is searched for in the reference applications, in the order in which they were declared. Finally, if it is still not found, everything takes place as if it existed in the current application.
· If appli equals zero (0), Adonix considers that the file is in the current application.

· If the volume is not specified, Adonix considers that it is the one where the application described by appli is installed.

· If mach is given, then this machine is taken into account.
· If mach equals “”, then this is the machine where the application (server) that is taken into account is installed.
· If mach equals the pound sign (#), then this local machine (client) is taken into account.

The result of the filcom function is of the Char type.

Hope this helps.

 

About Us

Greytrix is one stop solution provider for Sage ERP and Sage CRM needs. We provide complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third party add-on development and implementation expertise.

Greytrix have some unique solutions of Sage X3 integration with Sage CRMSalesforce.com and Magento eCommerce along with Sage X3 migration from Sage 50 US, Sage Pro and QuickBooks.  We also offer best-in-class Sage X3 customization and development services to Sage business partners, end users, and Sage PSG worldwide.

For more information on Sage X3 Integration and Services, please contact us at x3@greytrix.com. We will be glad to assist you.