Reuse artifacts
You create an application when you use the Application wizard on a SharePoint list or library. When you start the application wizard, a SmartObject is created for the list or library and gives you the choice of creating SmartForms, a workflow, and reports. The resulting collection of artifacts (SmartObjects, SmartForms, workflows, and reports) form your application.
Many businesses have multiple lists and libraries created from templates or created as copies. You can reuse the artifacts for these types of lists and libraries. Reusing these artifacts allows you to appify (create an application from) a list or library, and then use the SmartObject, SmartForms, or workflow re-use options to link the primary artifacts to matching secondary lists and libraries.
For example, a Human Resources collection of employee lists (identical in structure) that contain the employees for each major region. Employees_US contains information on employees in the United States of America, Employees_EU for employees in the countries of the European Union, and Employees_APAC for employees in the countries of Asia Pacific. Creating an application of the primary list, Employees_US (this choice is arbitrary as any of them can be the primary list since they all have the same columns) creates artifacts that you can reuse with the other two lists. In this example, you create SmartForms and a workflow that starts when a new employee is added to the list.
- You can use the SmartObject of the primary list in another SmartForm or workflow and configure the SmartObject reuse options to point to the secondary lists, Employees_EU and Employees_APAC.
- You can run SmartObject methods to configure the reuse options of the SmartForm so that the view you see in SharePoint of Employees_EU and Employees_APAC is the one created as part of the application.
- You can run SmartObject methods to configure the reuse options of the workflow so that when adding new employees to the Employees_EU and Employees_APAC lists, the workflow defined during the creation of the application starts.
- See Reuse data (SmartObjects) for more information about reusing data
- See Reuse forms for more information about reusing forms
- See Reuse workflows for more information about reusing workflows
- See How to: Create a SmartForm to link an application's SmartForms to a secondary list or library for information about linking an application's SmartForm to a secondary list or library
Considerations
- Create your application on your SharePoint root list, then re-use those SmartObject methods to access your secondary lists on your sub sites.
- The SharePoint app must be installed and activated on the site on which you create the primary application.
- You must activate the app on site collections containing secondary lists and libraries before you can link them to primary lists and libraries.
- Using a primary SmartObject method to access a secondary list only works on the same SharePoint Web Front-End (WFE), which can have multiple site collections with sub sites.
- When you make changes to your primary list or library, you must re-appify it to update the associated SmartObject. Click the list or library menu and select Application. For more information see Change a SharePoint list or library
- Any changes you make to the primary list or library must also be made to the matching secondary lists or libraries.
- Artifact reuse only works for lists and libraries that are compatible with each other. The secondary list or library must have the same columns and column types as the primary list.
- Reusing artifacts only works with SharePoint objects of the same type. You cannot appify a document library and reuse those artifacts with a list.
- You cannot use Calendar lists with the artifact reuse options. The Calendar list type does not include parameters used to link primary and secondary lists.
- You cannot use lists or libraries with a lookup to a library with the artifact reuse options.
-
When you attempt to create an application of a list or library that is linked to a primary list's artifact, you see an error message stating "This list is re-using an Application". You must remove the reuse links before you can appify the list or library. See Reuse forms for the steps to detach the Application from the secondary list or library.
- For lists and libraries only appified with forms, if you change your primary list from using SmartForms back to using SharePoint forms, you can appify your secondary list or libraries without resetting the form links. See Working with forms for more information on using SharePoint forms.
- You must refresh SmartObjects created before K2 Five Update 5.2 to enable the Site URL and List ID parameters.
- You can start a workflow using SharePoint events without appifying the list or library.
Also, see Planning and lifecycle management for further information and considerations when making changes to existing lists and libraries.