Reuse forms

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 which are then used to create SmartForms when you choose the option to generate forms for the list or library.

When you create SmartForms for your list or library, you can link those forms to other matching, secondary SharePoint lists or libraries. You then see the SmartForms when you view the secondary lists and libraries in SharePoint. This is useful when you customize your SmartForms with a special layout of the columns or formatting of the text, and want to see those customizations on your other matching lists or libraries. Your primary SmartForm is used to display the data of those secondary lists or libraries.

For example, if you have regional staff employee lists (Employees_USA, Employees_EU, and Employees_APAC), and the data structure of all the lists is the same and are on the same SharePoint web application, you can appify a primary list (Employees_USA) with SmartObjects and SmartForms, and then use the SmartForms you customized for that list to view data from your secondary lists (Employees_EU and Employees_APAC). 

Reusing primary list and library SmartForms for secondary lists and libraries

To link your secondary list or library you need the Site URL and List ID of your primary and secondary lists or libraries.

Use the following SmartObject methods to link your primary list or library SmartForms and your secondary lists or libraries.

First, run the Get SharePoint List Forms URL method of the SharePoint Integration Helper Methods system SmartObject.

Use your parent list or library's Site URL and List ID values as inputs. The method returns the following URLs

  • New Form URL
  • Edit Form URL
  • Display Form URL

Then run the Set Share Point List Forms URL method of the SharePoint Integration Helper Methods system SmartObject. Use your secondary list or library Site URL and List ID values as inputs, as well as the URL values returned from the first method. The secondary list or library is now linked to the SmartForm.

See How to: Create a SmartForm to link an application SmartForm reuse for an example of using these SmartObject methods.

Resetting the secondary list or library links

When you need to remove the reuse links, such as if your secondary list is no longer part of the same set of lists and is customized with new columns just for that region, you must reset the list. You can then appify it and it becomes its own solution not linked to other solutions.

For SmartForm links, run the ResetSharePointListFormsUrl method of the SharePoint.Integration.HelperMethods system SmartObject. Use the Site URL and List ID values of the secondary list or library you're resetting as inputs to the method.

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.

For workflow links, run the RemoveSharePointDynamicWorkflowLinking method of the SharePoint.Integration.HelperMethods system SmartObject. Use the Site URL and List ID values of the secondary list or library you're resetting as inputs to the method.

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.