cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
scameron1015
Frequent Visitor

Dynamic Text in Word Document Using CDS Connector

I would like to use Flow to populate a Word template with customized text based on values from CDS. For example, I have a field a Two Option field type in CDS. If the field is true, I would like to show specific language (not just "true") in my Word template. If the field is false, I would like to return other text.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @scameron1015 ,

 

Do you mean you want to populate the word template based on the Two Option Value of specific CDS record?

You can get the CDS record based on the GUID, and check the value of Two Option Field, Then use the Populate a Microsoft Word template to populate Word with data.

Please check the flow steps:

Snipaste_2019-12-03_11-02-48.png

Please check the word template and final word:

Snipaste_2019-12-03_11-05-39.png

If this doesn't make sense, please post back more detailed information with your scenario.

Best regards,

Sik

View solution in original post

3 REPLIES 3
v-siky-msft
Community Support
Community Support

Hi @scameron1015 ,

 

Could you share more about your scenario? What's the kind of Flow? Can you share some screenshot?

If you want to populate a word template with dynamic text, you have first to follow these steps:

1. Make sure the developer tab is added to your ribbon (link) , select the text you want to replace and select the following icon in the developer tab, then save the document to OneDrive

Snipaste_2019-11-27_12-17-19.png

2. Follow the screenshots of flow:

Snipaste_2019-11-27_12-08-14.png

3. Apply this flow to PowerApps, use if function to check the condition.

test1127.Run(If(First(Accounts).'Credit Hold',"A","B"),"C")  /* this is my test formula for your reference*/

Annotation 2019-11-27 121525.png

Best regards,

Sik

I am able to use the Populate a Microsoft Word template to populate Word with data from Flow using a Plain Text Content Control but I am wanting to do a slight variant on that. In CDS, I have a Two Option field so the value is true/false. If the value is true, I want the Word template to populate with the following text (and formatting):

 

Retirement Plan Committee Meetings. We will attend Client's annual Committee meeting. Meetings for all Plans between our firm and Client shall be scheduled concurrently (if applicable).

 

If the value is false, I do not want any test. I tried embedding a Plain Text Content Control in an If field in Word but that didn't seem to work.

Hi @scameron1015 ,

 

Do you mean you want to populate the word template based on the Two Option Value of specific CDS record?

You can get the CDS record based on the GUID, and check the value of Two Option Field, Then use the Populate a Microsoft Word template to populate Word with data.

Please check the flow steps:

Snipaste_2019-12-03_11-02-48.png

Please check the word template and final word:

Snipaste_2019-12-03_11-05-39.png

If this doesn't make sense, please post back more detailed information with your scenario.

Best regards,

Sik

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Top Kudoed Authors
Users online (1,006)