Of course, you can, you need to use RecordRef and FieldRef to do that...
I am not sure, this example is not tested, but you need something like this:
RecRef.GetTable(YourRec);
FRef := RecRef.FIELD(YourRec."Field Name"); //get the field into fieldref
FRef.SETFILTER(SomeValue); //set the filter to the selected field
RecRef.SetTable(YourRec); //set all fitlers back to your record variable
Comments
If you want to populate a variable you use
And there is no use filtering on variables because (unless it is an array) it only contains one value.
But you can do
RIS Plus, LLC
if xyz then
set var := "no."
else
set var := "Alt. No."
setfilter(var,10-110);
You can't do this in Navision
I think the closest thing we have would use RecordRef
RIS Plus, LLC
maybe this would be clearer
a function
setMyFilter(var)
inside the function
setfilter(var,somevalue);
Mostly I was wondering if what he was looking to do was Macro substitution
In some languages you can substitute a variable for a field
so thank everyone for your help.
I am not sure, this example is not tested, but you need something like this:
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
u re great..
=D> it's solve my problem