I have a simple solution for test with only one file :
rcd_record
rck_k_id primary key(integer)
rcd_name text 100
rcd_tabnbr integer
rcd_icon1 text 50
rcd_icon2 text 50
rcd_html_sum text 1000
rcd_htmlsum is a stored calculated field like this :
var tab = '      ';
// start HTML
globals.HTML_summary = ‘’
// insert tab before
var i=1;
while (i <= rcd_tabnbr)
{
globals.HTML_summary += tab;
i += 1;
}
//insert icon1
switch(rcd_icon1name)
{
case ‘right’ :
globals.HTML_summary += ' ’
break;
case ‘down’ :
globals.HTML_summary += ' ’
break;
default:
}
//insert record name
globals.HTML_summary += rcd_name
globals.HTML_summary += ’ ';
//insert icon2
switch(rcd_icon2name)
{
case ‘person’ :
globals.HTML_summary += ' ’
break;
case ‘company’ :
globals.HTML_summary += ' ’
break;
default:
}
//end HTML
globals.HTML_summary += ‘’;
return globals.HTML_summary;
I create a mnt_rcd (record_view) form just to created few records in the file, on that form I can see the rcd_htmlsum field that I create to display record data with indentation. On that form I can see data indented as foreseen.
I have an other form ViewAllRecords (list View), that I created to view all records together with indentation, but the simple fact to display that form
has for result that rcd_html_sum field is recalculated for each record and receive the same value that the first record.
The store calculated field should be recalculated only when records are changed.
I checked in the Sybase central with an interactive SQL session.
I join you the servoy solution.