The function you use is:
$tw.wiki.setText(tiddler, field, index, value, options);
where tiddler is the tiddler that has the field you want to change, field is the field you want to change, index is the index you want to change, value is the value you want set in that filed and I can never remember what options are available because I never use them.
If you give an index than it uses that instead of the field, if you are setting a field value set the index to null or undefined.