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)
Answers
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.
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?
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.
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.
Create filter field in table and use it in tableRelation Filter
"Job Task No." = FIELD("Job Task No. Filter")