How to get a specific field label programmatically?

Hello People.

I need your help here : I’m trying to access a field label by code in order to change it dynamically.
I’ve been searching all possible resources in vain yet.

Can anyone help me or give me a hint on this please ?

Thank you.

sc_label(“Customer”) = “Cust Name”;
sc_label({Customer}) = “Cust Name”;

This is to set the Label but how do you get the label of the field ?

I tried $val = sc_label(“Customer”) but get error. Seems like sc_label is a method only not a function.

Am I wrong ?

Thank you already anyway.

On the appropriate event this will grab whatever is in the field named Customer

$customer ={Customer};
///
Now you can change what appears on this field on the Before Show event of the form

if( something happens)
{
{Customer} = “NEW CUSTOMER”;
}