cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JPMontoya
Helper II
Helper II

Populate Word Template - dynamic schema

Howdy,

 

I attempted to use dynamic Input for the 'Populate Word Template'-action because I want my users to be able to dynamically specify which Template they want to use and to also make modifications to the respective template in whatever way they please (obviously without modifying the content controls).

This however led to me getting a 'Bad Request' response. Thinking it might be because I specified faulty schema I created a new template that basically only consists of a single content control ("A") but the issue remained.

PopulateWordTemplate_Input.pngPopulateWordTemplate_SC400.png

 

Now, according to the error message, the 'file source is not currently supported'. This however seems rather unlikely to me, as the file is located on oneDrive and if I hardcode the file by using the selector in the 'Populate Word Template' action it works. Unfortunately, I can't seem to get my hands on the outgoing request-body for the hardcoded action, so I can't verify that I specified the FileSchema properly and that might be what causes the action to fail.

 

Ultimately, my questions thus are:

  • Can this action not work with dynamically specified file locations?
  • If it does support dynamically specified file locations, how do I properly specify the schema? I need to be able to manually so, since the template is only known at runtime

 

Thanks in advance of any responses,

cheers,

JP

4 REPLIES 4
chsanche
Community Support
Community Support

Hi @JPMontoya 

 

Have you tried not using variables in Location, document Library and File fields? I don't think variables will work on these ones.

 

Best Regards,

If this post helps you give a :thumbs_up: and if it solved your issue consider Accept it as the solution

Hi @chsanche 

 

Yes, I have tried using the selector and that works. But it's not what I need. I need to be able to dynamically locate the file and thus use variables for the ID fields.

The ID's (Location, Library, File) are not the problem here, I think. I got these to work with plenty of other actions using the excel/oneDrive connectors. I assume the mechanics here are the same ones as the file ultimately also is on oneDrive.

The issue is how to specify the scheme of the content controls in the case where you don't hardcode the file and thus the schema cannot be loaded in advance.

PopulateWordTemplate_Hardcoded.png

To clarify this further: Above in the picture is what happens when you hardcode the file. you get the input-schema extracted and its fields presented (TargetTable, ProjectName). The problem with that is that the file is hardcoded, which presents zero flexibility. It does not even work if you replace this file with an identically named one, as it works with file-IDs and not file-names in the background.

If you do not hardcode the file and work with variables you don't get the schema loaded but instead get a generic field for 'dynamicFileSchema' as in the Screenshot in my initial post.

 

My question is how the syntax works for specifying the schema when it cannot be loaded i.e. when the file is not hardcoded. The action receives the input for (in this particular case) TargetTable & ProjectName in some specific way. I need to know how/in what form that input is received behind the scenes so I know how to specify the input for the generic 'dynamicFileSchema' field.

 

I hope that makes sense, else don't hesitate to ask for further clarifications 😄.

 

best regards,

JP

RichFunk365
Advocate I
Advocate I
Jiral
Frequent Visitor

Hello,

I also have the same problem. Please somebody can help us?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,307)