Hi:
Below in italics is AL code that I'm using in a Sandbox. This code had always "worked perfectly", until I modified the fields for Average Listeners, Audience Share, and Advertising Revenue to contain FlowField code shown in brackets below.
Ever since I added that code for these three fields, I have been unable to publish my work in Visual Studio Code.
When I try to publish, I receive the following error:
The field 'Average Listeners' cannot be located. Removing fields is not allowed.
The field 'Audience Share' cannot be located. Removing fields is not allowed.
The field 'Advertising Revenue' cannot be located. Removing fields is not allowed.
How do I modify this code to not have this error?
Thanks!
John
table 50100 "Radio Show"
{
fields
{
field(1; "No."; Code[20])
{
trigger OnValidate()
begin
end;
trigger OnLookup()
begin
end;
}
field(10; "Radio Show Type"; Code[10]) { TableRelation = "Radio Show Type"; }
field(20; "Name"; Text[50]) { }
field(40; "Run Time"; Duration) { }
field(50; "Host Code"; Code[20]) { }
field(60; "Host Name"; Text[50]) { }
field(100; "Average Listeners"; Decimal)
{
Editable = false;
FieldClass = FlowField;
CalcFormula = average("Listenership Entry"."Listener Count"
where("Radio Show No." = field("No."), Date = field("Date Filter")));
}
field(110; "Audience Share"; Decimal)
{
Editable = false;
FieldClass = FlowField;
CalcFormula = average("Listenership Entry"."Audience Share"
where("Radio Show No." = field("No."), Date = field("Date Filter")));
}
field(120; "Advertising Revenue"; Decimal)
{
Editable = false;
FieldClass = FlowField;
CalcFormula = sum("Radio Show Entry"."Fee Amount"
where("Radio Show No." = field("No."), "Data Format" = filter(Advertisement)));
}
field(130; "Royalty Cost"; Decimal) { }
field(1000; "Frequency"; Option) { OptionMembers = Hourly,Daily,Weekly,Monthly; }
field(1010; "PSA Planned Quantity"; Integer) { }
field(1020; "Ads Planned Quantity"; Integer) { }
field(1030; "News Required"; Boolean) { InitValue = true; }
field(1040; "News Duration"; Duration) { }
field(1050; "Sports Required"; Boolean) { InitValue = true; }
field(1060; "Sports Duration"; Duration) { }
field(1070; "Weather Required"; Boolean) { InitValue = true; }
field(1080; "Weather Duration"; Duration) { }
field(1090; "Date Filter"; Date) { FieldClass = FlowFilter; }
}
//keys
//{
//key(PK; "Entry No.") { Clustered = true; }
//key(Reporting; "Radio Show No.", Date) { SumIndexFields = "Fee Amount"; }
//key(Reporting2; Type, "No.", Date) { SumIndexFields = "Fee Amount"; }
//}
//
}