Table and column name or no. |
You can import data to several tables in the same file and to the
same table in several places in the file. In the case of each table
the @ character comes first followed by the table's name or a unique
external table number. These are followed by a set of brackets
containing names or numbers for the columns which will be assigned
values. Example @Actor (ActNo, Nm)
1 Associate
name
This will update or enter an associate with associate
number 1 and name Associate name. Fields that contain letters
must start and end with . Numbers can be written without .
Decimal figures must have a point as decimal separator unless
the field starts and ends with .
|
Sequence number |
This is a primary key field to which you can assign the next free
number using the + key. The line number and sort sequence number are
automatically completed if they do not have values when importing
new rows. Sort sequence numbers that are missing are set to the line
number. The field should then not have the value 0, if it is
included in the import file. |
Reference to head in lines |
If there is no reference to the head in a line the program enters
a reference to the previous head imported from the file. This means
that you do not, for instance, need to specify order, batch, layout
or form numbers. |
Replace or add rows/values |
You can specify which fields the program will replace rows or
values in during the import process as an alternative to the primary
key. You can insert an equals sign before a column name in the
import file. For example, this may be appropriate in the Associates
table, where the primary key is an Associate number
Example @Actor (=CustNo, Nm) 10000 Associate name This
parameter updates customer number 10000 in the Associates
table.
|
Using the supplier's products when importing prices |
When importing into the price and discount matrix you can also
add :Sup after the ProdNo field (ProdNo:Sup) to show that the
product numbers in the file are the supplier's product numbers. Visma Business then performs a lookup in the Delivery alternatives table to find
out which product number is registered. |
Values |
Data appears under the table heading. The values are specified
with a space between the fields on one or more lines to be inserted
in the table. A row in the database can run over more than one line
if you insert a backslash / at the end of the lines continuing on to
the next line. If there are other programs that need to import the
file you can select a field separator and start/finish character for
the fields from the Page setup dialog box. Quotation marks are used
by default as start/finish characters in the fields and a space as a
field separator. |
ISO codes as an alternative to currency number and country
number |
In consideration of data produced by other programs the program
allows both numbers and ISO codes in the Currency number and Country
number fields. You receive an error message before import if the ISO
code is not defined in the Currency or Country table. |
Log file @OPEN_LOG_FILE ()
@CLOSE_LOG_FILE()
|
The commands @OPEN_LOG_FILE (File name) and @CLOSE_LOG_FILE ()
open and close a file to log errors that occur during the processing
of the file. These might, for example, be warnings during data
conversion. Visma Business writes a line to the file for each warning. The line contains the
database name, the table name, the column name, the value and the
error message. Possible messages:
- In the event of too many digits: Up to 9-10 digits accepted
(32-bit integers) Up to 4-5 digits accepted (16-bit
integers) Up to 2-3 digits accepted (8-bit integers) Up to
15-16 digits accepted (64-bit floating point numbers).
- In the event of invalid characters in the field: The number
contains invalid characters.
- Too many characters in a text field: The text can have up to
@ characters (where @ is replaced with the maximum number of
characters).
After import you receive a message if any error messages have
been logged. You receive a message about the number of error
messages, the name of the command/import file and the log file (or
the last log file that was opened, if several have been written
to). |
Selection of active page element @GO_TO_SUBWINDOW_FOR_TABLE
()
|
The command @GO_TO_SUBWINDOW_FOR_TABLE (Table no.) skips to the
first page element with the given external table number in the
document window opened with @OPEN_WINDOW. External table numbers are
displayed in brackets on the title line of the page elements when
you have selected External no. in the dialog box for the
Home/Company/Texts menu item. If @GO_TO_SUBWINDOW_FOR_TABLE does not
find a page element with the given table number, the program skips
@SELECT_ALL and @EXEC_PMC. |
Search @FIND ()
|
@FIND (Value) searches for rows in which the active column has
the given value. @FIND (Value) simulates the menu choice Search row
(Ctrl+F) in the View menu. If the value is a text, it will be in
double quotes. The active column can be set with the command
@GO_TO_COLUMN. You can also search in hidden columns but after you
should go to a visible column if the window is visible. @FIND_APPEND
(1 or 0) makes the next @FIND command continue to replace the
previous search. By default @FIND replaces the previous search.
@FIND_CLEAR () displays all rows (in the selection) again.
Example A command profile with the following content
@FIRM_BEGIN (1) @OPEN_WINDOW (128) @GO_TO_COLUMN (2874) @FIND
(10241) @VISIBLE (1) searches for the row(s) of the customer number
10240 in the Orders table in the window layout number 128, with
company number 1. The search is performed with the customer number
column in the Orders table, which has the external column number
2874. If the Orders table is not the first table in the layout,
insert @GO_TO_SUBWINDOW_FOR_TABLE (127) between @OPEN_WINDOW and
@GO_TO_COLUMN. If you want to search for a name, you can replace the
external column number 2874 with 2875, and the customer number 10241
with the name John Smith for example. |
Searching using Add @FIND_APPEND ()
|
@FIND_APPEND (1 or 0) makes the next @FIND command continue to
replace the previous search. By default @FIND replaces the previous
search. |
Cancel search @FIND_CLEAR ()
|
@FIND_CLEAR () displays all rows (in the selection)
again. |
Allocating new customer/supplier and employee numbers when
importing |
Using the Add parameter it is possible to allocate new
customer/supplier and employee numbers when importing from file.
When the import file has Add behind CustNo, SupNo or EmpNo a new
associate is created with the next available customer/supplier
number or employee number. Example @Actor (CustNo:Add, Nm)
New customer @Actor (SupNo:Add, Nm) New supplier @Actor (EmpNo:Add,
Nm) New employee Merk: You cannot use the Add parameter if you have
rows that already have customer/supplier numbers or employee
numbers. The values in the fields are overwritten, and new
numbers are allocated if this parameter is used.
|
Show program window @VISIBLE ()
|
@VISIBLE (1 or 0) makes the program window visible if you select
1 as the parameter, or invisible if you select 0. By default the
program window is invisible when commands/import files are performed
with the command line parameter /R. If the program window is
visible, Visma Business is not automatically closes when the file has been finished. This
can also be a way of initiating the workspace without saving it as a
workspace. |
Fill in values @FILL_IN ()
|
The command @FILL_IN (Value) fills in the given value
- in the active column (Selected by the @GO_TO_COLUMN command,
or the first column in the page element.)
- on the active row (For example the first row returned by the
@FIND command.)
- in the active page element (Selected by the
@GO_TO_SUBWINDOW_FOR_TABLE command, or the first page
element in the window layout/document window.)
|
Select an entire table @SELECT_ALL ()
|
The command @SELECT_ALL () selects the entire active table in
order to process all the rows included in the selection. |
Suppress dialog boxes @DEFAULT_PARAMETERS ()
|
The command @DEFAULT_PARAMETERS, followed by 1 or 0 in brackets,
switches on or off the suppression of dialog boxes. This applies to
approval dialog boxes after printouts, and the dialog boxes for the
processing menu choices Re-save in the Orders table and Inside lead
time in the Stock balances table.
- @DEFAULT_PARAMETERS (0) The dialog boxes are shown by
default.
- @DEFAULT_PARAMETERS (1) Produces the same result as OK in
the dialog boxes, without modifying the choices that Visma Business suggests.
|
Execute processing menu choice @EXEC_PMC ()
|
The command @EXEC_PMC (Processing menu choice number) performs
the processing menu choice with the given external menu choice
number in the active page element. External menu item numbers are
displayed in the menus when you have selected External no. in the
dialog box of the Home/Company/Texts menu item. The command logs the
reason why the processing menu choice has not been performed to a
log file that is open (see the command @OPEN_LOG_FILE above).
Possible messages: @EXEC_PMC terminated because:
- parameter syntax error
- @OPEN_WINDOW or @OPEN_SUBWINDOW failed
- @GO_TO_SUBWINDOW_FOR_TABLE failed
- unknown menu choice no
- unknown table no for menu choice
- child frame not found
- menu choice not in sub window
- no table proc
- no rows
- dead lock
- database error
Graphic form editing If the previous program window is not
visible (with @VISIBLE (1)) during graphic form editing with
@EXEC_PMC (74), it becomes visible when you enter it, and it becomes
invisible again when you exit graphic form editing. Example
(You replace the parameters in italics with current values.)
@OPEN_SUBWINDOW (92) @GO_TO_COLUMN (2026) @FIND (form type)
@GO_TO_COLUMN (2027) @FIND_APPEND (1) @FIND (form number) @EXEC_PMC
(74)Merk: You cannot use all processing menu items in automatic
routines, as some dialog boxes expect answers and can be
deactivated using the parameter @DEFAULT_PARAMETERS
().
You will see an overview of valid EXEC_PMC numbers in the
Change log definition table. |
Execute file @EXEC_FILE ()
|
The command @EXEC_FILE (File name) starts the given file. This
means that the command starts the program that has the relevant file
type. |
Report parameters @REPORT_PARAMETERS ()
|
The command @REPORT_PARAMETERS (Report parameters or ) overwrites
and uses the report parameters that are saved with the layout. The
report parameters that are saved in the layout are used by default.
The parameters are the same as those used in the column Report
parameters in the tables with windows and workspace windows, except
for /R
/P on the order documents when processing open
customer and supplier entries, which can be replaced by entering
the report variant number as a parameter for the @PREVIEW or
@PRINT command. (/R followed by a report number, and /P by a
processing number for this report. /R is used by all reports. /P
is used for reports of which there are several
variants).
|
Preview @PREVIEW ()
|
The command @PREVIEW (Report variant number or no parameter)
previews the given report variant, or the one suggested in the print
dialog box in a corresponding way as the @PRINT command. If the
previous program window is visible (with @VISIBLE (1)), the preview
window becomes visible when you enter and becomes invisible again
when you close the preview. Example (The parameters in
italics are replaced with current values.) @FIRM_BEGIN (Company
number) @OPEN_WINDOW (Window layout number) @REPORT_PARAMETERS
(Report parameters) @PREVIEW (Report variant number) |
Print to file @WRITE_TO_FILE ()
|
The command @WRITE_TO_FILE (File name or ) causes the next @PRINT
command write to the given file and to the printer. @PRINT writes by
default to the printer. Example (Replace the parameters in
italics with current values.) @FIRM_BEGIN (Company number)
@OPEN_WINDOW (Window layout number) @REPORT_PARAMETERS (Report
parameters) @WRITE_TO_FILE (File name) @PRINT (Report variant
number) |
Printout @PRINT ()
|
The command @PRINT (Report variant number or no parameter)
creates the given report variant, or the one suggested in the print
dialog box, based on what is saved in the active document window.
Report variant number The report variant numbers are displayed
before the names of the report variants in the drop-down list under
the Reports button in File/Print/Print format/General/Create. For
some reports it is important that the correct report variant number
is selected in order for the report to function, this applies in
particular to order documents. |
Report parameters @REPORT_PARAMETERS ()
|
You can set report parameters with the command
@REPORT_PARAMETERS. Visma Business then skips the print dialog box and report dialog box, for
example the order document dialog box. |
Automatic approval of printouts |
If you also want the program to skip the approval dialog boxes,
@DEFAULT_PARAMETERS (1) must be included on an earlier line in the
file. |
Error messages |
The commands @PRINT and @PREVIEW log to an open log file (see the
command @OPEN_LOG_FILE above) about the reason why the print/preview
has not been performed. Possible messages: @PRINT terminated because
or @PREVIEW terminated because :
- parameter syntax error
- @OPEN_WINDOW or @OPEN_SUBWINDOW failed
- child frame not found: No active document window.
- unknown report variant no for window: The report variant
number that was given as a parameter for the @PRINT or
@PREVIEW command is not legal for the combination of page
elements in the document window.
- unknown order processing no. for window: The report
parameter /P (in the layout) was followed by an illegal
order processing number.
Example: (Replace the parameters in italics with current
values.) @FIRM_BEGIN (Company number) @OPEN_WINDOW (Window layout
number) @REPORT_PARAMETERS (Report parameters) @PRINT (Report
variant number) |
Close window @CLOSE_WINDOW ()
|
@CLOSE_WINDOW () closes the active document window. |
Delete layout @DELETE_WINDOW_LAYOUT ()
|
@DELETE_WINDOW_LAYOUT (Layout no.) deletes the window layout with
the given number. If you have not entered the window layout number
as a parameter, the last imported window layout earlier in the file
is deleted. Visma Business deletes the row with this layout number in the tables that store
the window layout. |
Delete company @DELETE_FIRM ()
|
The command @DELETE_FIRM (Company number) deletes the company
with the given company number. If there is a row in the Company
table in the system database with this company number, then this row
is deleted. Rows in the User access table with this company number
and the associated company database (similar to saving a deleted row
in a page element to the Company table), are also deleted. |
Comments |
You can enter comments in lines starting with a semi-colon and
you can insert blank lines. You can enter comments wherever you want
in the file. |
Test with other fields than the primary keys |
The Associates table contains customers, suppliers and employees,
as well as contact persons. It is not customer no./supp.
no./employee no/ that is the primary key. This is tested against
the Associate number field. If you want to import from a file of
customers, for example, and you do not know the entry's associate
number, you can use a command (=) in front of the field name in the
table header. @Actor (=CustNo, Nm, Ad1... |