How to handle the lookup columns threshold in a Document Generator template for a single item

How to handle the lookup columns threshold in a Document Generator template for a single item

f your Document Generator Template contains more than 12 lookups that exceeds the SharePoint lookup column threshold, you may face the situation that the generated document may not include all lookup values. To overcome this problem we propose the following workaround steps:

In the meantime Variables from Action Builder are supported as well in Document Generation (Teamsware Studio Updaten 16.03.2023) which could be used instead of window variables. See Document Generator intoduction.

1. Add an Execute Script action before the Generate Document action to set values for all lookups you need in the global variables and then use it in the template:






window.dgLookups = {
"Lookup1": [[Lookup1.Value]],
"Lookup2": [[Lookup2.Value]],
....
"LookupN": [[LookupN.Value]]
};

2. Use these variables in the template. Your lookup placeholders in the Generate document template should look like this:
[[=window.dgLookups.Lookup1]]

3. If needed, you can clean up the variables after the document is generated using the Execute Script action after the Generate Document action.
You can find an example in the appendix below. Simply import these .json files into the Action Builder using the Export/Import button in the top right-hand corner:

    • Related Articles

    • Introduction to Document Generator

      What is the document generator? The "Document Generator" allows you to generate documents based on a standard Microsoft Word file filled with SharePoint list data. This can be triggered in actions used in list actions, modern forms or background ...
    • Action: Generate document

      Generate document action allows you to generate documents based on a standard Microsoft Word file filled with SharePoint list data. For more information about Action Builder read Action Builder Introduction article. For more information about ...
    • How to use QR code image in the Document Generator template

      There are a lot of services that generate QR codes. In this article, we use this service to generate QR code image with Send HTTP request action and use this image in the Document Generator template: 1. Add Send HTTP request action with the API ...
    • Teamsware Studio Update 13.04.2023

      Bug fixes & improvements Modern Forms Version 1.3.19 Extended enhanced lookup with additional columns to show in the dropdown. Added 'Use proxy server to fix CORS error' option in 'Send HTTP request' action. Fixed uploading photos for the Image ...
    • Teamsware Studio Update 30.03.2023

      Bug fixes & improvements Modern Forms Version 1.3.18 Fixed evaluating placeholders in the Footnote and Endnote of the document template in 'Generate document' action Fixed generating document with a single quote in the file name Solution Studio ...