Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
23 | reyssat | 1 | # update_field is number of field to update |
2 | # update_content is the new content. |
||
4530 | bpr | 3 | number_field=9 |
23 | reyssat | 4 | ecnt=!recordcnt wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
5 | !for e=1 to $ecnt |
||
6 | exo_$e=!record $e of wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
||
4530 | bpr | 7 | exo_$e=!line 1 to $number_field of $(exo_$e)\ |
23 | reyssat | 8 | \ |
9 | \ |
||
10 | \ |
||
11 | \ |
||
12 | \ |
||
13 | \ |
||
14 | \ |
||
15 | \ |
||
4530 | bpr | 16 | \ |
23 | reyssat | 17 | |
18 | !next e |
||
19 | !if $update_field>=0 |
||
20 | !if $update_field>0 |
||
4863 | bpr | 21 | tmp=!linecnt $(exo_$exo) |
22 | !if $update_field > $tmp |
||
23 | !for tmp2 = 1 to $[$update_field-$tmp] |
||
24 | exo_$exo=!append line $ $ to $(exo_$exo) |
||
25 | !next |
||
26 | !endif |
||
23 | reyssat | 27 | exo_$exo=!replace line number $update_field by $update_content in $(exo_$exo) |
28 | !else |
||
29 | exo_$exo=$update_content |
||
30 | !endif |
||
31 | !endif |
||
32 | !writefile wimshome/log/classes/$wims_class/sheets/.sheet$sheet |
||
33 | !for e=1 to $ecnt |
||
34 | !if $e!=$exo or $update_field>=0 |
||
4530 | bpr | 35 | ef=!line 1 to $number_field of $(exo_$e) |
23 | reyssat | 36 | !appendfile wimshome/log/classes/$wims_class/sheets/.sheet$sheet :$ef |
37 | !endif |
||
38 | !next e |
||
39 |