i have a few procedures that assign a fieldname to a local variable then do a formulafill on a different field using the first field. something like this:
field A
local fld fld = info(‘fieldname’)
field B
formulafill datavalue(fld)
this worked in pan6: it filled B with the values in A.
in panx it fills B with ‘A’.
i’ve also tried formulafill «fld» and formulafill (fld) with the same results.
This works, but I don’t think it should be necessary.
field A local fld fld = info('fieldname') field B formulafill datavalue(datavalue(fld))
The fieldvalue( function allows you to identify a field name as a formula by putting an extra set of parentheses around it. I think datavalue( should work in a similar manner, but it doesn’t.
field A local fld fld = info('fieldname') field B formulafill datavalue((fld))
The method recommended by the help file is.
field A local fld fld = info('fieldname') field B formulafill datavalue(""+fld)
ok, i just read the help file entry for datavalue(.
the trick is making the argument a formula, not merely a variable.
using datavalue(fld) as the argument accomplishes the same thing.