1. Data initialization in a form

    Artikel: AN0001632Aktualisiert:
    Die vorgegebene Sprachenversion vom Artikeltext wird angezeigt, weil es kein Text von der ausgewählten Sprache und Version gibt.

    Data in a form can be initialized by means of object OGDataRow. This object can be used in a rule script or in a data detail script in the class detail. In this way you can e.g. set determined/calculated default value.


    Example: Set up of default values of various column types at a new record creation by means of script for the record detail (set in the class detail):

    function OnCreateEntity()
      OGDataRow['shorttext'] = 'a';
      OGDataRow['middletex1'] = 'aaaaaaaaaaaaaa';
      OGDataRow['longtext'] = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
      OGDataRow['guid'] = 'b1273719-4ca0-4953-a82a-128120cc8a1a';
      OGDataRow['picture'] = './ImagesData/FCI/exclamation.png';
      OGDataRow['true'] = true; //Yes;
      OGDataRow['integer'] = 890;
      OGDataRow['decimal'] = 5,8;
      OGDataRow['date'] = System.DateTime.Now;
      OGDataRow['colour1'] = 42;
      OGDataRow['colour2'] = System.Drawing.Color.FromArgb( 0, 0, 255); //blue - RGB