banner



How To Upload A Microsoft Word Template To Gsuite

Exercise y'all demand to update whatever legal, contract or other Give-and-take documents dynamically? What virtually not only updating those documents automatically simply too displaying certain sections based on weather condition? This is possible with Power Automate. While in that location are several third-party connectors available at an additional cost, this article will walk you through some tips and tricks on how to update Word templates dynamically using the Word connector'due south "Populate a Microsoft Word template" action. This is useful if your budget does non allow for additional cost for a third-political party connector.

First, brand sure your Word template includes Plain Text Content Controls in the places where yous need Menstruation to either update with field values from Dynamics or update with the text you lot need. To add a Patently Text Content Control in Discussion, you must first brandish the "Developer" tab. To practice this, get to File > Options > Customize Ribbon. Then under Customize the Ribbon and under Main Tabs, select the Developer bank check box and click OK.

So to add the control, become to the "Programmer" tab and choose the "Plain Text Content Control" option in the ribbon. Give your command a name because Flow will use this to enter information.

If you only need to populate fields inside that Word document, and then you can enter Dynamics fields into the evidently text content control fields displayed in the "Populate a Microsoft Word template" action after yous've gear up it to pull from your Word template.

If you also need to show/hibernate sections of the document, and then here are some tips and tricks to practise and so without having to go with a third-party solution. Of import: Please be enlightened that while this solution is great for a curt document, it can get cumbersome and fourth dimension-consuming if you have a really long and circuitous document with strict formatting requirements. If that is your requirement and then you volition be ameliorate off going with a third-party solution or possibly build an SSRS report:

1. Use the "Initialize a Variable" action

Fix your variable Type to String and then, using the "Expression" tab in the Dynamic Content window, you can enter an IF expression to enter text into that plainly text content control based on a condition. Here is an example of an IF statement that references a Dynamics field:

if(equals(triggerBody()?['prefix_fieldname'],'Yes'),'Hither are the terms and weather to claim rebate for the products listed beneath','Here are the terms and weather condition to purchase the products listed below')

Using this statement allows us to tell the Flow to update the certificate with unlike lines of text depending on what value a field is set to within Dynamics.

For example:

2. Use the "Compose" activeness

Yous can utilise Etch to "hold" any lines of text that you desire to add together to the Populate a Microsoft Word template after. For example, allow's say yous've added a Condition Command early in your flow that volition populate a department or field in your Word certificate simply you lot will have boosted weather and/or variables later in your period that you as well need to utilise for the Populate a Microsoft Word template. Because you tin't employ the Populate a Microsoft Word template action for the same Word document more than than once in a Flow, that's where this "Etch" action comes in.

For example:

3. Utilise the "Suspend to an Array" action

You would use Append to an Array when you have related records from Dynamics that yous are referencing to populate a table in the Give-and-take template. Please see this article from Microsoft on how to add a repeating content control to your table in Give-and-take PRIOR to creating this activeness. In Period, when related records are pulled from the "List records" activeness, information technology automatically creates "Utilise to each" loops that allow it to know which related record it needs to cheque in Dynamics. The problem is, the Populate a Microsoft Word template activeness doesn't allow you lot reference actions you might take used within those "Apply to each" loops. This is where the Suspend to an Array is useful because Catamenia does allow you lot to reference an "Append to an Assortment" action in the "Populate a Microsoft Word template" action.

To use it, you must add an "Initialize a Variable" activeness earlier in your Flow, set the "Blazon" to "Array", and leave the "Value" blank (the Suspend to Array action will populate that value automatically). Once the Initialize a Variable has been added, add the "Append to an Array" activity where you need it later in the Flow and prepare the "Proper name" the name of the "Initialize a Variable" action yous added earlier. Then under "Value" you tin can add lawmaking that looks like the following where "plaintextcontentcontrolname" is the proper noun of whatever Plain Text Content Control y'all desire updated in the Word template and "fieldname" is any Dynamics field y'all want it to pull a value from. Make sure you put quotes around the plain text content control name and DON'T put quotes around the field name. Also make certain you put a comma at the end of the fieldname if yous have more than than one line of fields to enter:

{

"plaintextcontentcontrolname": fieldname,

"plaintextcontentcontrolname": fieldname

}

Finally, when y'all go to enter your variable in the field in the "Populate a Microsoft Word template" action, you volition need to click on the "Switch to array" text icon to the far correct of the first repeating content control field. This will take all of the fields from that table in Word and combine them into one within the "Populate a Microsoft Word template" action.

For example:

Initialize a Variable

Append to an Array

Populate a Microsoft Discussion template

In that location you have it! This is a good alternative to populating Word templates dynamically without having to become with an expensive third-party solution or rent developers to lawmaking something.

Source: https://medium.com/hitachisolutions-braintrust/tips-and-tricks-for-populating-word-templates-using-power-automate-bf13af0d9549

Posted by: papenfusscoutubts.blogspot.com

0 Response to "How To Upload A Microsoft Word Template To Gsuite"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel