Update UDF

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
GSL
Posts: 96
Joined: Tue Oct 10, 2017 12:44 pm

Update UDF

Post by GSL » Mon Sep 27, 2004 1:01 pm

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.

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Update UDF

Post by kfleming » Tue Sep 28, 2004 8:26 am

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

GSL
Posts: 96
Joined: Tue Oct 10, 2017 12:44 pm

==> Update UDF

Post by GSL » Tue Sep 28, 2004 7:19 pm

How about if you rename the UDF MYTEXT to FRUIT, will it update the calculated field TEXT to FRUIT() in reportA?____Thanks.

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

===> RE: Update UDF

Post by kfleming » Wed Sep 29, 2004 7:24 am

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

Post Reply