Показать сообщение отдельно
Старый 10.10.2013, 14:52   #4  
ex3em is offline
ex3em
Участник
 
38 / 19 (1) ++
Регистрация: 22.07.2008
Цитата:
Сообщение от Stitch_MS Посмотреть сообщение
А не лучше ли создать новый display метод на таблице с детализацией?


X++:
display Comment comment()
{
    ActionTable actionTable;
    Comment comment;
 
    if (this.Comment != '')
    {
        comment = this.Comment;
    }
    else
    {
        select firstonly Comment from actionTable
            where this.ActionId == actionTable.ActionId;
 
        comment = actiontable.Comment;
    }
 
    return comment;
}
у меня OuterJoin
условие вывода скорее такое

X++:
if (this.RecId)
{
        comment = this.Comment;
}
else
 {
        select firstonly Comment from actionTable
            where this.ActionId == actionTable.ActionId;
 
        comment = actiontable.Comment;
        //но в том-то и беда что записи this в этом случае нет - this.ActionId всегда будет ""

  }