bdk9904
26th March 2013, 14:20
Hello,
I am using the new LN functionality of user defined fields. I see the field I created in the database.

Does anyone know if and how I can access the field within a script? I would like to test the values of the field and assign values to that field. I would also like to read the field from other scripts.

Can I do this?
Thanks.

bhushanchanda
26th March 2013, 15:27
Hello,
I am using the new LN functionality of user defined fields. I see the field I created in the database.

Does anyone know if and how I can access the field within a script? I would like to test the values of the field and assign values to that field. I would also like to read the field from other scripts.

Can I do this?
Thanks.

Just write your query and then pass the value to a variable of the same domain and just put that variable on your report layout.
select tdsls400.* from tdsls400 where ....
selectdo
var = tdsls400.cdf_...
endselect

Regards,

Bhushan.

BaanInOhio
26th March 2013, 17:42
A few ways to get the value from within a select statement:

Placing the cdf table field into a local variable from the select statement:

domain .... my_fldn

select tab000.cdf_fldn:my_fldn
from tab000
......



Importing the variable from the table record buffer after reading. This is often how you get the field within a DAL library:

ret = get.var(pid, "tab000.cdf_fldn", my_fldn)


Updating the table CDF field in a script is done by exporting the variable to the table record buffer:

my_fldn = ....
ret = put.var(pid, "tab000.cdf_fldn", my_fldn)

bdk9904
27th March 2013, 10:42
Thanks for the details!

I will try asap!