Administration Data import export Import Expended field definitions - robinfeng/beashelp GitHub Wiki

扩展字段定义


Navigation: Administration > Data import/export > Import: help-zahnrad Extended field definitions No contents entries on this page Contents The expanded field definitions can be reached following the reference arrow from the source field.

This allows a convenient definition of the source field. The available source fields are directly displayed.

Field Description Source Type As in the selection list "from table", "SQL" or "DEFAULT" Source field As described in the selection list max. length The maximum length. Over-lengths are truncated. 0=No checks conversion beas script that allows another conversion of the target. The source is stored in VALUE and is also returned this way (see example below). The date record is not accepted when the script is terminated with CANCEL. The reason for the log can be submitted in the field "e_info". Script to Test beas script that checks whether a transfer is to take place. Return with "CANCEL" means that the data record is not accepted. Examples further below. The variable "e_info" can be set. Its value is included in the log can be specified as reason for "Non-acceptance".

help-beispiel

Example of conversion:

In the source table, the item number is located in the field "item" which should be transferred to the target field "itemcode". However, a new item number should be defined. There is a self-generated table "u_itemconvert" in which the old item number appears under "itemcode" and the new item number under "newitemcode".

Target field=itemcode Type=from table Source field=item Conversion=

sql=select newitemcode from beas_ruda_itemcode where itemcode='' setvar=wert=

SQL=Execute SQL command. The value determined from the source field appears in the variable "value" which is specified in the WHERE clause as placeholder. Return of beas script-SQL commands always occurs in the variables value1...valuex, which is assigned to the variable VALUE with setvar=value=<value1>.

Test script example If the content of the determined source value does not exist in the table beas_matgrp, no entry should take place

setvar=e_info=Value does not exist in the table beas_MATGRP sql=select count(*) from beas_matgrp where matgrp_id='' if==0=cancel=end

The variable e_info (log information) is first filled with the error message. The SQL command is used to check whether an entry exists. If not (number of entries = 0, result located in variable Value1), the script is terminated with CANCEL and the record is not accepted.


返回 主页

⚠️ **GitHub.com Fallback** ⚠️