Broker 10.5 | webMethods Broker Documentation | webMethods Broker Client C API Programmer's Guide | Creating and Initializing Events | Structure Data Fields | Setting Structure Fields | Setting a Struct Field from an Event
 
Setting a Struct Field from an Event
Since structure field may contain other fields, the awSetStructFieldFromEvent function allows you to set all of those contained values with just one function call. To use this function, simply follow these steps.
1. Create an empty event of any event type, using the awNewBrokerEvent function. Since the data you will put into this event is not likely to match a real event type definition, create this event without a Broker client so it will not be type checked.
2. Set the fields and values of the event created in step 1 so that they match the fields in the structure you want to set. Use the awSet<type>Field and awSet<type>SeqField functions.
3. Call the awSetStructFieldFromEvent function, passing the event created in the above steps as the source value.
4. Envelope fields on the source event are ignored.