Reuse data

From Nintex K2 Cloud Update 21 onwards there are two different apps for SharePoint Online. The legacy Nintex K2 Cloud for SharePoint app: used for SharePoint upgraded tenants, and the Nintex K2 Cloud (SPFx) app: used for new tenants.

When you create an application from a SharePoint list or library, you create SmartObjects, SmartForms, workflows, and reports. The SmartObjects are the only required artifacts when integrating (creating an application) a list or library because they are used to integrate with data from the list or library. The other artifacts you create are optional artifacts that use the SmartObjects.

When accessing lists and libraries that have the same data structure (those with identical columns) that are on the same SharePoint web application, you can appify each list or library or you can appify a primary list or library and use those SmartObject methods to access the secondary lists or libraries by using the Site URL and List ID parameters of the SmartObjects to point to those secondary lists and libraries.

For example, if you have an Employee list for staff in the USA (Employees_USA) and a separate employee list for staff in the European Union (Employees_EU), and another for staff in Asia/Pacific (Employees_APAC), and the data structure of all the lists are the same and are on the same SharePoint web application, then you can appify a primary list ( (Employees_USA) and use those SmartObject methods to access your secondary lists (Employees_EU and Employees_APAC). This gives you the ability to dynamically target different lists and libraries by using a single artifact so that you don't need to appify every list and library that requires integration.

Reusing primary list and library SmartObjects for secondary lists and libraries

Use the Site URL and List ID parameters of the SmartObject method to set the site of a secondary list or library. Shown here is a SmartObject method that accepts these optional parameters. Used without these parameters, the SmartObject retrieves data from the primary list or library. By specifying these parameters, you redirect the SmartObject to retrieve data from a secondary list or library.

The Site URL points to the SharePoint site where the list is. Include site and subsite values, such as https://sa-sp-current.denallix.com/HR/USA.

The List ID is the unique identifying number of the list.

The example below shows the Site URL and List ID used to execute the Get List Items method of the primary list (Employees_USA) and return the data from one of the secondary lists (Employees_EU) to the SmartForm.

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.