I'm new in QC, especially in Workflow scripting. I went through the online doc, and decided to practice with a "simple" script - I want the "Planned Host Name" to be automatically set to a value when adding a test to a test set ...

Despite all my efforts, it seems it's not so "simple".

I am confident that the following code should do the trick:

<font class="small">Code:</font><hr /><pre>
Sub TestLab_TestSet_New
On Error Resume Next
TestSetTest_Fields.Field("TC_HOST_NAME").Value="my _host"
On Error GoTo 0
End Sub
</pre><hr />

However, when I try to add a test to a test set, nothing happens. I mean the field "Planned Host Name" stays empty [img]/images/graemlins/mad.gif[/img]

Well, if anyone of you has an idea why ...

Many thanks in advance !