Add "does not equal" condition in FlowField lookup

Hello all,

I’m trying to add a FlowField to the Job Ledger Entry table that looks up the Item No. in the Item table where the Description values match. However I only want it to do this if the Description value in the Job Ledger Entry table is NOT blank. Below code gives you an idea of what I’ve been trying to do. Is it possible to add this condition in the lookup?

tableextension 60003 JobLedgerEntry extends “Job Ledger Entry”
{
fields
{
field(60000; “Part No. Ref.”; Code[20])
{
FieldClass = FlowField;
CalcFormula = lookup(“Item”.“No.” where(Description = field(Description), Description <> const(’’)));
}
}
}

Newbie here, had the same problem and ended up doing the following in the page that needed to display the flowfield:

layout
    {
        area(content)
        {
            repeater(Control1)
            {
                field("Part No. Ref."; GetPartNoRef(Rec))
                {
                    ApplicationArea = All;
                }
            }
        }
    }

    local procedure GetPartNoRef(var JobLedgerEntry: Record "Job Ledger Entry"): Text
    var
        Item: Record Item;
    begin

        Item.Reset();
        if Rec.Description <> '' then begin
            //Custom logic here
        end else begin
            //Other custom logic here
        end;

        if Item.FindFirst() then begin
            exit(Item."No.");
        end;
    end;

Edit:

It is wrong to use the description as a foreign key though, there isn’t any tablerelation in that field for table Job Ledger Entry on BC standard:

field(8; Description; Text[100])
        {
            Caption = 'Description';
        }