1. Ordering texts with special format

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

    In some cases we need to order texts in another way than a simple ordering of common texts. There are cases when we use a special fomat but we want to order according to values corresponding to texts. In such cases we can create a column of Decimal type with values corresponding to the text and update it by means of rules After new and existing record save. We then order by this column.

    Ordering IP addresses

    Example: Script in rules after new and existing record save (we use in the class column ip of type Text, which is updated by user, and column ip_sort of type Decimal, which is updated automatically by a corresponding decimal value).

    var ip = OGActualDataRow['ip'];
    if ( ip != null && ip != '')
    var dt = OG.TextUtils.CreateDottedText(4, 4, 3);
    OGActualDataRow['ip_sort'] = System.Convert.ToDecimal( dt.ParseLong( ip));