In Edit/View pages sometimes you may need to assign field value as section title. This is how I achieve the task:
Following codes goes to 'Javascript onLoad event' of the relevant Edit/View page:
var ctlreqdep = Runner.getControl( pageid, 'requested_department');
var ctlresdep = Runner.getControl( pageid, 'responsible_department');
var section1 = pageObj.getSection(0);
section1.headerElement().find('a').html('<b>'+Runner.getCustomLabel("title_requested_dep")+ctlreqdep.getValue()+'</b>');
var section2 = pageObj.getSection(1);
section2.headerElement().find('a').html('<b>'+Runner.getCustomLabel("title_responsible_dep")+ctlresdep.getValue()+'</b>');
Table Fields: requested_department, responsible_department
Custom Labels: title_responsible_dep, title_requested_dep (you need to assign in Misc>Label Editor>Custom Labels)