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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (48,394)