1. Function CreateTypeRows

    Article: AN0002011Updated:

    Function is used for extraction of values into a reference class and update of the reference link.
     

    OG.DataRow.CreateTypeRows( int sourceTextColumnId, int sourceClasslinkColumnId, int destinationalTextColumnId)

    Imagine class CARS, in which there is list of cars. In column MAKE there is a text value of its make. - e.g. skoda, bmw, audi...
    Now you want to move this text expression of make into a separate class and create a reference table of car makes.
    Create a new class CARMAKE with column NAME. Then insert a new column into the class CARS with reference to a class CARMAKE.

    The function inserts those values into the refrence table that are not there yet in the first step and in the second step it updates the reference column.
    The function takes only undeleted records into consideration.
    If the records already exist in the reference table then only existing records are created.
    When reference column is updated, only those records are updated that have a null value in the reference column. Therefore, if you set a value to some record manually, it will not be overwritten by the function.

    The function can be called by means of scripts or by the function Quick data import / Extract reference class via form in Administration tool.

    Description of parameters 

    Name Description
    sourceTextColumnId Id of the column in the source class in which text value is stored.
    sourceClasslinkColumnId Id of the column in the source class where the link to the reference table record shall be stored.
    destinationalTextColumnId Id of the column in reference class where the name from column sourceTextColumnId shall be stored.

     

×