In CalcFormula of FlowField, how to filter the values on basis of some field from a setup table?

azharsaeedkhan
Member Posts: 37
I have a solution where FlowFields are calculated on the basis of a hard coded filter, now i have moved all the hard coded values to a setup table to make the solution generic. But i am unable to filter on the basis of field from setup table.
In the image below, i want to filter it like
"Job Task No." = FIELD(SetupTable.Field)

In the image below, i want to filter it like
"Job Task No." = FIELD(SetupTable.Field)

0
Best Answer
-
Hello!
1. Create Field "Job Task No. Filter" with flowfilter type
2. OnAfterGetRecord trigger on Page: "Job Task No. Filter" := SetupTable.Field
3. In CalcFormula - "Job Task No." = FIELD("Job Task No. Filter")
4.6
Answers
-
Hello!
1. Create Field "Job Task No. Filter" with flowfilter type
2. OnAfterGetRecord trigger on Page: "Job Task No. Filter" := SetupTable.Field
3. In CalcFormula - "Job Task No." = FIELD("Job Task No. Filter")
4.6 -
@AlexeyShamin Thank you it did work for now
I have same scenario in TableRelation property of a normal field of type code, what do you recommend for that, how should i get rid of hard coded values?0 -
azharsaeedkhan wrote: »
I have same scenario in TableRelation property of a normal field of type code, what do you recommend for that, how should i get rid of hard coded values?
In TableRelation in Condition field you can use only COnstants or Filters (hard coded)
In "Table Filter" field you can use fields for filtering.
In wich field you have hard coded values?
0 -
AlexeyShamin wrote: »azharsaeedkhan wrote: »
I have same scenario in TableRelation property of a normal field of type code, what do you recommend for that, how should i get rid of hard coded values?
In TableRelation in Condition field you can use only COnstants or Filters (hard coded)
In "Table Filter" field you can use fields for filtering.
In wich field you have hard coded values?
I want to replace the hard coded highlighted value with
"Job Task No." = FIELD(SetupTable.Field)
is this possible?0 -
In this case I don't usually put filter directly on table releation just because you can't and you have to hardcoded it at suggested.
I prefer to check the value in validate trigger (with a testfield for example) so you can verify manual inputs and, for show only filtered records on drilldown I customize the lookup trigger for open the page with a filtered records variable.1 -
In this case I don't usually put filter directly on table releation just because you can't and you have to hardcoded it at suggested.
I prefer to check the value in validate trigger (with a testfield for example) so you can verify manual inputs and, for show only filtered records on drilldown I customize the lookup trigger for open the page with a filtered records variable.
Yes, that is what i have done. But i thought maybe there is some way to do it from TableRelation property without using hard coded value.0 -
In WHERE statment try use FIELD instead FILTER
0 -
AlexeyShamin wrote: »In WHERE statment try use FIELD instead FILTER
It won't allow you unless the field exists in the same table. In my case the field which i want to filter the Job Task No. is from setup table that is different from this table.0 -
try like in CalcField
Create filter field in table and use it in tableRelation Filter
"Job Task No." = FIELD("Job Task No. Filter")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