Hello, so I have two fields, Employee and Applicant which table relate to their respective entities. I want to develop them in such a way that if a record is fetched in Employee, the Applicant field becomes hidden and vice-versa. Any idea of how I can achieve this?
I've tried playing around with some IF statement logic but it doesn't seem to work.
Hi, so that was my first solution. I used the visibility property together with if statements and triggers. But it doesn't seem to work. would you know of any other way? or could you check if this code has issues
field(Employee; Employee)
{
ApplicationArea = All;
Visible = AppVisible;
trigger OnValidate()
begin
if Employee <> '' then
AppVisible := false;
end;
}
field(Applicant; Applicant)
{
Visible = EmpVisible;
ApplicationArea = All;
trigger OnValidate()
begin
if Applicant <> '' then
EmpVisible := false;
end;
}
Var
EmpVisible: Boolean;
AppVisible: Boolean;
I would create a variable and assign it to the Visible property of the field. The validation of the variable could be determined on validation of the field or from a page trigger like OnOpenPage. Once you have determined the right place to trigger the logic you can use an IF statement like IF Applicant <>'' then VisibilityVariable := true;
A boolean variable is by default false.
This link may help: docs.microsoft.com/.../devenv-visible-property
Sohail Ahmed
1,063
YUN ZHU
1,002
Super User 2025 Season 1
Mansi Soni
810