Dynamic Data Exchange Settings
This window helps you write a text that pulls an account balance, a material quantity or other values from alameen into another program, such as Excel, using Dynamic Data Exchange (DDE). The window does not show the result itself; it generates the text of a formula that you paste into a cell or a macro, and that cell then asks alameen for the value. The steps are in Set up Dynamic Data Exchange.
Opening the window
- Open the company file, then click the File tab.
- Click Tools.
- Click Dynamic Data Exchange. The button description: "This window offers the possibility to exchange information between programs so it helps sharing information between Al-ameen and other programs such as Excel."
The button appears if a file is open and the licence includes accounting. It is available in every subscription plan. In Users Management, the permission that carries its name, under Operations, controls it; without it the button stays visible and nothing happens when you click it. See File tab: Tools and Import and Export for the page.
alameen registers an exchange service named Ameen when the file opens and removes it when the file closes. The generated formulas work only while alameen is running with the file open. While an exchange request is running the program does not let you close the file.
Category and functions
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Category | A list that filters the functions by kind. | No | The first item shows all functions, then an item for each of accounts, materials, groups and customers. Functions that do not belong to a kind (such as cost center balance, bills count and the current user name) appear under the first item only. Changing the category selects its first function. |
| Functions | A list of the available functions. | Yes | Choose a function. The choice changes the fields shown and generates the formula again. The full table is at the end of the page. |
Under the two lists are two read-only lines:
- The general formula of the selected function, in the shape
Ameen|function name!parameters, showing the names of the parameters the function asks for, such asAmeen|AcnBal!Acc, date1, date2. - A short explanation of the function, which is the "What it returns" column of the table.
Parameter fields
Only the fields the selected function needs are shown. The program arranges them from top to bottom as they appear.
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Account | The account of the function. | Yes for functions that start with an account | An account card. It is passed by name or by code depending on the function (the "Fields you set" column). |
| Contra Account | The contra account. | Yes for functions that have "contra" | An account card. |
| Cost Center | The cost center. | Yes when the function asks for it | A cost center card. |
| Currency | The currency of the function. | Yes when the function asks for it | A list of currencies. |
| From | Start of the period. | — | A date. Shown with the functions that use a period. It must not be after To, otherwise the message "Beginning date is bigger than ending date" appears. |
| To | End of the period. | — | A date. |
| Customer | The customer of the function. | Yes for customer functions | A customer card. Passed by name. |
| Material | The material of the function. | Yes for material functions | A material card. By name or by code depending on the function. |
| Warehouse | The warehouse of the function. | Yes for material functions that ask for it | A warehouse card. |
| Group | The group of the function. | Yes for group functions | A group card. By name or by code depending on the function. |
| Form | A list of bill types (titled Form), with a box for each. | Yes when the function asks for it | Tick one type or more. They all start unticked. If you tick none, the formula is Error followed by "Please specify" and the words for a bill type. The formula writes the abbreviations of the ticked types, separated by []. |
| Unit | The measurement unit of the material or group. | No | A list: First Unit, Second Unit, Third Unit and Default unit (the default). Shown with the quantity and unit functions. |
| Account (the second one) | A customer account that limits the bills. | No | An account card. If you leave it empty the formula writes an empty value. Shown with the functions for bill values, quantities and counts. |
| Show Unposted Entries | Adds the unposted entries to the balance. | No | Shown with the balance functions (AcnBal, AcnBalCont and AcnBalContCost), and ticked each time you choose one of them. The formula writes ShowUnPostedEnt="1" or "0". |
| Parity | — | — | Always hidden. The program does not show it. |
If a required field is missing, the Format box shows the word Error with a second line, which is "Please specify" followed by the field name (for example "Please specify Account"). In the VBA type only Error appears.
Type and format
| Field | Description | Required | Values and rules |
|---|---|---|---|
| Type | The language of the generated text. | Yes | A list: Excel (the default), VBA and C#. |
| Format | The generated text, to read and copy. | — | It is generated automatically when you change the function, any field or Type. After generating, the program selects all the text so that you can copy it. |
The text types:
- Excel: a cell formula. Example, for a function named
AcnGetCodeabout an account namedCash:=Ameen|AcnGetCode!'AccName="Cash"'. If the function needs no parameters, a space is written between the quotes. - VBA: macro code. It declares variables, opens a channel with
Application.DDEInitiate, requests the value withApplication.DDERequest, converts it to text, a number or an integer according to what the function returns, then closes the channel. - C#: the text "غير متوفر حالياً" appears, in Arabic in both languages.
Buttons
| Button | What it does |
|---|---|
| Generate | Generates the formula again. This also happens automatically when you change any field. |
| Copy | Selects the Format text and copies it to the clipboard. |
| Close | Closes the window. |
If logging is on in the file, when you close the window the program writes a line for each successful generation of the formula, including the automatic ones, with the values you set (the account, material, group or customer, the dates and the currency). See Log details.
Table of functions
The table shows all the functions in the list in their order. The "Function" column is the name in the list, and "Function name" is what is written in the formula.
| Function | Function name | Category | Fields you set | What it returns |
|---|---|---|---|---|
| Account Code | AcnGetCode | Accounts | Account | Get account code |
| Account Name | AccGetName | Accounts | Account (by code) | Get account name |
| Account balance between two dates | AcnBal | Accounts | Account (by code), From, To, Show Unposted Entries | Get account balance within certain period |
| Total Debit Account between two Dates | AcnDebit | Accounts | Account (by code), From, To | Get Total Debit for account during Specific Period |
| Total Credit Account between two Dates | AcnCredit | Accounts | Account (by code), From, To | Get Total Credit for account during Specific Period |
| Accounts' count sub to account | AcnGetSons | Accounts | Account | Get number of accounts connected to account |
| Final Account Name | AcnGetFinalName | Accounts | Account | Get final account name |
| Final Account Code | AcnGetFinalCode | Accounts | Account | Get final account code |
| Customer debt | CustDebt | Customers | Customer, From, To | Get customer debt |
| Customer account name | CustAccName | Customers | Customer | Get customer acccount |
| Customer account code | CustAccCode | Customers | Customer | Get customer account code |
| Customer Phone1 number | CustPhone1 | Customers | Customer | Get customer phone1 number |
| Customer Phone2 number | CustPhone2 | Customers | Customer | Get customer phone2 number |
| Customer's Telex number | CustTelex | Customers | Customer | Get customer telex number |
| Customer's Fax number | CustFax | Customers | Customer | Get customer fax number |
| Notes written in customer card | CustNotes | Customers | Customer | Notes written in customer card |
| Material quantity in warehouses | MatQnt | Materials | Material, From, To, Warehouse | Get material quantity in warehouses |
| Material quantity in warehouses for invoices forms | MatQntRepSrcs | Materials | Material, From, To, Warehouse, Form | Get Material quantity in warehouses for Invoices Forms |
| Material Average Price | MatAvgPrice | Materials | Material | Get material average price |
| Material last purchase price | MatLastPrice | Materials | Material | Get last purchase price of material |
| Material Max. purchase price | MatMaxPrice | Materials | Material | Get material Max. purchase price |
| Material Pricing Policy | MatPolicy | Materials | Material | Get material pricing policy |
| Material Specifications | MatSpec | Materials | Material | Get material specifications |
| Material measurement unit | MatUnity | Materials | Material | Get material measure unit |
| Material group | MatGroup | Materials | Material | Get material group |
| Wholesale price | MatNWhole | Materials | Material | Get wholesale price |
| Semi wholesale price | MatNHalf | Materials | Material | Semi wholesale price |
| Retail price | MatNRetail | Materials | Material | Retail price |
| Consumer price | MatNEndUser | Materials | Material | Consumer price |
| Export price | MatNExport | Materials | Material | Export price |
| Distributor price | MatNVendor | Materials | Material | Distributor price |
| Gifts quantity disbursed from warehouse | MatOutBouns | Materials | Material, Warehouse, From, To | Gifts quantity disbursed from warehouse |
| Groups count sub to group | GrpNGrpCnt | Groups | Group | Groups count sub to group |
| Materials count sub to group | GrpNMatCnt | Groups | Group | Materials count connected to group |
| Account balance to contra account | AcnBalCont | Accounts | Account, From, To, Contra Account, Show Unposted Entries | Account balance to contra account |
| Total debit account to contra account | AcnDebitCont | Accounts | Account, From, To, Contra Account | Total debit account to contra account |
| Total credit account to contra account | AcnCreditCont | Accounts | Account, From, To, Contra Account | Total credit account to contra account |
| Account balance to contra account with cost center | AcnBalContCost | Accounts | Account, From, To, Contra Account, Cost Center, Show Unposted Entries | Account balance to contra account |
| Total debit account to contra account with cost center | AcnDebitContCost | Accounts | Account, From, To, Contra Account, Cost Center | Total debit account to contra account |
| Total credit account to contra account with cost center | AcnCreditContCost | Accounts | Account, From, To, Contra Account, Cost Center | Total credit account to contra account |
| Account balance to cost center | AcnBalCost | Accounts | Account, From, To, Cost Center | Account balance to cost center |
| Total Debit Account to cost center | AcnDebitCost | Accounts | Account, From, To, Cost Center | Total Debit Account to cost center |
| Total Credit Account to cost center | AcnCreditCost | Accounts | Account, From, To, Cost Center | Total Credit Account to cost center |
| Cost Center balance between two dates | CostBal | No category | Cost Center, From, To | Cost Center balance between two dates |
| Material quantity for cost center | MatQtyCost | Materials | Material, From, To, Cost Center | Material quantity for cost center |
| Currency ledger | CurGL | Accounts | Account, From, To, Currency | Currency ledger |
| Item value for invoices forms between two dates | MatValue | Materials | Material (by code), From, To, Currency, Form, Account (customer account) | Item value for invoices forms between two dates |
| Item quantity between two dates | MatQntBill | Materials | Material (by code), From, To, Unit, Form, Account (customer account) | Item quantity between two dates |
| Material Quantity of invoices Forms with Gifts between two dates | MatQntBillBonus | Materials | Material (by code), From, To, Unit, Form, Account (customer account) | Material Quantity of invoices Forms with Gifts between two dates |
| Item unit name | MatUnitName | Materials | Material (by code), Unit | Item unit name |
| Number of Invoices between two dates | BillCount | No category | From, To, Form, Account (customer account) | Number of Invoices between two dates |
| Group value for invoices forms | GroupValue | Groups | Group (by code), From, To, Currency, Form, Account (customer account) | Group value for invoices forms |
| Materials' Total Quantities sub to bills' forms group | GroupQntBill | Groups | Group (by code), From, To, Unit, Form, Account (customer account) | Materials' Total Quantities sub to bills' forms group |
| Number of bills of bills' forms between two dates for a material | BillCountMt | Materials | Material (by code), From, To, Form, Account (customer account) | Number of bills of bills' forms between two dates for a material |
| Bill's forms count of bills for a Group | BillCountGr | Groups | Group (by code), From, To, Form, Account (customer account) | Bill's forms count of bills for a Group |
| All accounts' count sub to a certain account | AccoutAllCount | Accounts | Account (by code) | All accounts' count sub to a certain account |
| Customers' count of invoice forms between two dates | CustCountBillDtrRng | No category | From, To, Form | Customers' count of invoice forms between two dates |
| Customers' count of invoices forms for material | CustCountBillDtrRngProduct | Materials | Material (by code), From, To, Form | Customers' count of invoice forms between two dates |
| Customers' count of invoices forms for a group | CustCountBillDtrRngGroup | Groups | Group (by code), From, To, Form | Customers' count of invoice forms between two dates |
| Current user name | GetCurLoginName | No category | — | Current user name |
The last four (CustCountBillDtrRng, CustCountBillDtrRngProduct, CustCountBillDtrRngGroup and GetCurLoginName) appear only if the licence includes the cost centers feature.
Messages
| Message | When it appears | What to do |
|---|---|---|
| Beginning date is bigger than ending date | From is after To in a function that uses both dates. | Correct the two dates. |
| Please specify (and the field name) | Appears inside the Format box, not in a window. It means a required field is empty. | Fill the field. |
| غير متوفر حالياً | You chose the C# type. | Choose Excel or VBA. |
Related
This page applies to alameen ERP 10, version 10.1.79.764.