Page 1 of 1

Update UDF

Posted: Mon Sep 27, 2004 1:01 pm
by GSL
Questions regarding UDF:____1. After renaming a UDF, will all the reports using this UDF automatically update with the new name? If not, is there a way to do it instead of opening every report to fix the calculation field?____2. I have some Look-Up UDFs using address table to look up address information. Out company is in the process of migrating this address table to a different table with new table name and field names. If I update UDFs with new table and field names, will reports using those UDFs update automatically? For example, the original UDF is Address1 = CLOOKUP(LookUp, "AD_ADDR_1", "CD_ADDR.DBF", "CD_ADDR.CDX", "AD_TYPE_NO"), the new one is Address1 = CLOOKUP(LookUp, "ADDR_1", "ADDR.DBF", "ADDR.CDX", "ADR_NO")____Thanks in advance.

=> RE: Update UDF

Posted: Tue Sep 28, 2004 8:26 am
by kfleming
If you really do have a User Defined Function, reports that use that UDF will evaluate the expression of that UDF based upon its definition at the time the report is opened.____So if I had a UDF called MYTEXT whose expression is "Apples" and I have reportA with a calculated field called TEXT with the expression MYTEXT(), it will print Apples. If I then open reportB and modify the UDF MYTEXT to make its expression "Oranges" the next time I open and run reportA, my calculation will then print Oranges since that is the current value of the UDF.____Kathleen__R&R Support

==> Update UDF

Posted: Tue Sep 28, 2004 7:19 pm
by GSL
How about if you rename the UDF MYTEXT to FRUIT, will it update the calculated field TEXT to FRUIT() in reportA?____Thanks.

===> RE: Update UDF

Posted: Wed Sep 29, 2004 7:24 am
by kfleming
No it will not. The name of the UDF is hard coded in the report. So if the name is changed, the report will give an error about the missing UDF name and will not know that it has been renamed in the UDF file.____Kathleen__R&R Support