When using a script data source to create multiple property bags (this can be useful, for example, when the data is fed into a performance data mapper; each property bag becomes a mapped performance value), there are two common mistakes.
- After creating the property bag, adding its property/value pairs, and adding the bag to the ScriptAPI object, be sure to destroy the property bag before reusing the object reference variable.
- Use the ReturnItems call at the end to return multiple data items.
Lines of interest are highlighted below. These are the most common mistakes around multiple property bags.