cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DoguKaya
Regular Visitor

Populating Content Controls in Per-Language Word Template

I am using Powerapps and Power Automate to generate business forms in different languages. As an example, an English Invoice is to be created based on business data from Powerapps, and the Invoice_EN template in Sharepoint. Powerapps passes JSON business data to Power Automate, which uses the "Populate a Microsoft Word template" action from the Word Online (Business) Connector.

 

So far so good but I'd like to keep all language related logic in the template, not in Powerapps or in Power Automate if possible. As it stands, the content control for the payment terms, for example, requires some language dependent text (ie. "30 days in advance" vs "CAD"). Ideally, JSON from Powerapps would contain language independent data, and this would be mapped to the language dependent version based on the template docx file. I could include the language logic in Powerapps or in some flows to translate the text into the correct language, but that would break isolation. The person designing the template should be able to see and set all possible language related content from within the template.

 

I see that dropdown is a supported content control, and it has "Value"-"Display Name" pair. This got me excited, but unfortunately I wasn't able to set the Value from flow, and get the Display Name, as I was hoping. I could consider including some simple macros in the template that somehow get triggered by the flow, and adjust the dropdown control to its correct value based on business data from JSON, but I couldn't think of a way to do that either.

 

Am I missing something? I have been searching and trying different approaches for a couple days now. The best I could think of was to set a localization JSON string as a File Property in the Document Library, and use that to translate the business data to Display data within Power Automate. This means that some of the language logic is in the template, and some of it is embedded in a flow, which is less than ideal. What would be the best way to accomplish proper isolation of logic?

 

BTW, I see many people complaining about the Action requiring hardcoded filename, which is a bummer but that is not what I am asking here.

0 REPLIES 0

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,453)