As you correctly noted, the data for both tasks is captured correctly in the raw data file. From the comments:
"(both backward and forward digit variables get stored in the datafile under the same name e.g. TE_TT, TE_ML, ML and MS)"
It is not possible to add further lines to the summary data file -- it captures the state of the various variables *at the end of the task*, here after the backward digit span portion.
If you wanted to have separate variables for forward vs. backward captured, you can simply log the respective values:
<summarydata >
/ file = "DigitSpanVisual_summary.iqdat"
/ columns = [script.startdate, script.starttime, script.subjectid,
values.TE_ML, values.TE_TT, values.ML, values.MS,
values.fTE_ML, values.fTE_TT, values.fML, values.fMS, values.bTE_ML, values.bTE_TT, values.bML, values.bMS]
</summarydata>