I take it you are calling this from an ON_PRE_VALIDATE trigger?
I suggest you consider the following:
1. The affected resource field is 'affected_resource', not 'affected_rc'. Use 'bop_sinfo -d <object>' to display the field names in the object layer for use in spel, as the output from 'pdm_extract' shows the names in the schema layer which are not always the same.
2. Use 'is_null(affected_resource)' or 'is_null(this.affected_resource)', to test the value of the field. Putting double quotes round the label turns it into a string, so you're currently testing 'is the string "affected_rc" null?' - which it will never be.
3. No need to use 'format' to set the string into 'zmsg'. This would do:
zmsg = "Configuration Item is required in order to close this incident";
Hope that helps! Please let me know how you go.
Regards,
James