New field on list form

JedrzejT
Member Posts: 267
Hello
I have 2 flowfields type (EXISTS) - boolean
FldExist1,FldExist2
On form I want to show only one field
I add textbox to tablebox and set SourceExpr = NewField (Variable)
IF FldExist1 Or FldExists2 Then
NewField:=TRUE
ELSE
NewField:=FALSE
Whats the best option for it ?
Form is list type form, FldExist1,FldExist2 is not visible.
Thanks
I have 2 flowfields type (EXISTS) - boolean
FldExist1,FldExist2
On form I want to show only one field
I add textbox to tablebox and set SourceExpr = NewField (Variable)
IF FldExist1 Or FldExists2 Then
NewField:=TRUE
ELSE
NewField:=FALSE
Whats the best option for it ?
Form is list type form, FldExist1,FldExist2 is not visible.
Thanks
0
Comments
-
Tempoary, I put this code in OnAfterGetRecord but this is the worst soluton I think . Variable Trans = form.sourcetable ](*,)
Trans.GET("No.");
Trans.CALCFIELDS("Sem In departure","Tractor In departure");
IF (Trans."Sem In departure"=TRUE) OR (Trans."Tractor In departure"=TRUE) THEN
InDeparture:=TRUE
ELSE
InDeparture:=FALSE;
CurrForm.UPDATECONTROLS;0 -
Create a function called "NewField" in the table, with a boolean return value. Inside the function, you program your thing, and RETURN the boolean value.
Then, on your list form, you just add a textbox to the listbox, and in its SourceExpr, you enter MyTable.NewField.0 -
Thanks
That is more elegant code.0 -
You can do this without code
Just put in the SourceExpr
(FldExist1) Or (FldExists2)
You can always put one line of code in the SourceExpr.
This works.0 -
Right, which is the same without having it available on another form. For consistency and maintenance reasons I prefer to put it in the table. If you have more than one list form for that table, they would both be updated when you change the code in the table.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions