Version:
  1. Read data from the system

    Article: AN0001858 Displayed: 667x

    This example reads active (not deleted) records from the class Id 100, where there is value end in the column Id 30.

    /* create filter */
    var f = OG.DataRow.GetDataRowFilter( 100);
    f.SetColumnData( 30, 'end');
    f.Filter_OnlyActive = true;

    /* read data */
    var drList = OG.DataRow.GetDataByFilter( f);
    if ( drList != null)
    {
        /* process data */
    }

    Below example reads data from class, that are marked in column 'active' as true and sets for them in column 'column_code_1' value from column 'column_code_2'.

    /* create filter and read the data */
    var f = OG.DataRow.GetDataRowFilter(OGModel, 'topic');
    f['active'] = true;
    f.Filter_Sort = 'order';
    var topics = OG.DataRow.GetDataByFilter(f);
    //go through records
    for( var it = 0; it < topics.Count; ++it)
    {
    var t = topics[it];

    //set value from one column to another
    t['column_code_1'] = t['column_code_2'];

    }

  2.    ---
    Your rating:
    Rated by users: 0x
  3. Top
SearchTitle
×