Custom UD field blank if separate UD field is blank

What would be the best way to set for example Quotehed.Number01 to be blank if Quotehed.Character01 is blank otherwise be set to a set number.

What are you trying to achieve?

Reference below. Goal is to have “Sold to rep comm %” populate with “3%” if there is a “sold to rep group”. If no “sold to rep group” is populated then the “Sold to rep comm%” will be set to blank/null ect. Quotehed.Number01 is epibinded to “sold to rep comm%” and Quotehed.Character01 is epibinded to “sold to rep group”.

I’m looking for something like this I put together but not sure this will run without errors.

Erp.Tables.QuoteHed QuoteHed;

	QuoteHed= (from QH_row in Db.QuoteHed
    where QH_row.Company == Session.CompanyID && QH_row.QuoteNum == QuoteHed
    select QH_row).FirstOrDefault();
if (QuoteHed.Character12 != null)
{
  QuoteHed.Number03 = '3';
}