SOLVED

Populate a Microsoft Word template with information from specific row in SharePoint list

%3CLINGO-SUB%20id%3D%22lingo-sub-1983599%22%20slang%3D%22en-US%22%3EPopulate%20a%20Microsoft%20Word%20template%20with%20information%20from%20specific%20row%20in%20SharePoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1983599%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20relatively%20new%20in%20Power%20Automate%20and%20I%20am%20trying%20to%20create%20new%20flows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20SharePoint%20List%20with%20lost%20of%20items.%3C%2FP%3E%3CP%3EThen%20I%20have%20form%20in%20Sharepoint%20with%20one%20question%20%22ID%20%3F%22.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22StandaK_2-1607884682581.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240057iBF1F01629ADD4E03%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22StandaK_2-1607884682581.png%22%20alt%3D%22StandaK_2-1607884682581.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CEM%3E(Sorry%20for%20Czech%20language%20in%20this%20screen)%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20created%20a%20flow%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22StandaK_0-1607884254669.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240055i1822D8070494F437%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22StandaK_0-1607884254669.png%22%20alt%3D%22StandaK_0-1607884254669.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22StandaK_1-1607884303510.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240056iC4D1BC327AE44C04%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22StandaK_1-1607884303510.png%22%20alt%3D%22StandaK_1-1607884303510.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20fill%20out%20the%20form%2C%20for%20example%20with%20ID%203%2C%20then%20the%20flow%20will%20start.%20And%20what%20I%20need%20from%20this%20flow%20is%20to%20insert%20row%20number%203%20(ID%20of%20the%20row%20is%203)%20into%20the%20document%20with%20all%20information%20in%20that%20row.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECreating%20the%20document%20is%20working.%20I%20tested%20that.%20But%20I%20do%20not%20know%20how%20to%20insert%20only%20information%20from%20the%20specific%20row%20into%20document.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20you%20please%20someone%20give%20me%20advice%20%3F%20I%20tried%20something%20but%20nothing%20worked.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20appreciate%20any%20help%20%3A-).%3C%2FP%3E%3CP%3EThank%20you%20and%20have%20a%20nice%20evening%2C%3C%2FP%3E%3CP%3EStanda%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1983599%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Elist%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Flow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPower%20Automate%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1984652%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20a%20Microsoft%20Word%20template%20with%20information%20from%20specific%20row%20in%20SharePoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1984652%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F891561%22%20target%3D%22_blank%22%3E%40StandaK%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3Ethere%20is%26nbsp%3Bthe%20straightforward%20way%26nbsp%3Bhow%20to%20do%20that.%20In%20%3CSTRONG%3EGet%20Items%3C%2FSTRONG%3E%20step%2C%20click%20on%20%22Show%20advanced%20option%22%20and%20then%2C%26nbsp%3Byou%20must%20fill%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3E%3CEM%3EFilter%20query%3C%2FEM%3E%20-%20to%20get%20item%20with%20specific%20ID%20you%20must%20use%20query%3A%26nbsp%3B%3CEM%3EID%20eq%20intVariable%3C%2FEM%3E%20(this%20variable%20you%20must%20get%20from%20the%20form%20response)%3C%2FLI%3E%3CLI%3E%3CEM%3ETop%20Count%3C%2FEM%3E%20-%20it's%20a%20good%20idea%20limit%20number%20of%20responses%2C%20in%20this%20example%20set%20count%20to%201.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EMore%20info%20about%20filtering%20you%20can%20found%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsharepoint%2Fdev%2Fbusiness-apps%2Fpower-automate%2Fguidance%2Fworking-with-get-items-and-get-files%23filter-queries%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EIn-depth%20analysis%20into%20'Get%20items'%20and%20'Get%20files'%20SharePoint%20actions%20for%20flows%20in%20Power%20Automate%20%7C%20Microsoft%20Docs%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1985458%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20a%20Microsoft%20Word%20template%20with%20information%20from%20specific%20row%20in%20SharePoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1985458%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F507121%22%20target%3D%22_blank%22%3E%40ZdenekHavel%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20the%20reply.%3C%2FP%3E%3CP%3EI%20did%20like%20you%20said%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22StandaK_1-1607956842859.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240175i9F17EB1D1F6903FF%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22StandaK_1-1607956842859.png%22%20alt%3D%22StandaK_1-1607956842859.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20there%20is%20always%20error%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22StandaK_0-1607956746519.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F240174i6AA6C01A1FD5FFC4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22StandaK_0-1607956746519.png%22%20alt%3D%22StandaK_0-1607956746519.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fprod-92.westeurope.logic.azure.com%2Fworkflows%2F45f233c7a777421ab4c16636df7f5d0b%2Fruns%2F08585936502674784067220570969CU57%2Factions%2FGet_items%2Fcontents%2FActionOutputs%3Fapi-version%3D2017-07-01%26amp%3Bse%3D2020-12-14T18%253A00%253A00.0000000Z%26amp%3Bsp%3D%252Fruns%252F08585936502674784067220570969CU57%252Factions%252FGet_items%252Fcontents%252FActionOutputs%252Fread%26amp%3Bsv%3D1.0%26amp%3Bsig%3DoF5d4kAGPO1j0BGJWkF_m-qVUCxlQmTY38uJwVmW_w0%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3ELink%20for%20error.%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20idea%20what%20that%20might%20be%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%2C%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1993553%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20a%20Microsoft%20Word%20template%20with%20information%20from%20specific%20row%20in%20SharePoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1993553%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F507121%22%20target%3D%22_blank%22%3E%40ZdenekHavel%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F891561%22%20target%3D%22_blank%22%3E%40StandaK%3C%2FA%3E%26nbsp%3Band%20the%20dynamic%20content%20in%20the%20filter%20query%20must%20have%20single%20apostrophes%20before%20and%20after%20it%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22filterQuery3.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F241055i2436A2B723011E5C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22filterQuery3.png%22%20alt%3D%22filterQuery3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20operators%20in%20a%20filter%20query%20are%3A%3CBR%20%2F%3Eeq%20%3D%20equals%3CBR%20%2F%3Ene%20%3D%20not%20equals%3CBR%20%2F%3Egt%26nbsp%3B%20%3D%20greater%20than%3CBR%20%2F%3Ege%20%3D%20greater%20than%20or%20equals%3CBR%20%2F%3Elt%20%3D%20less%20than%3CBR%20%2F%3Ele%20%3D%20less%20than%20or%20equals%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1994047%22%20slang%3D%22en-US%22%3ERe%3A%20Populate%20a%20Microsoft%20Word%20template%20with%20information%20from%20specific%20row%20in%20SharePoint%20list%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1994047%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F891561%22%20target%3D%22_blank%22%3E%40StandaK%3C%2FA%3E%26nbsp%3B%20do%20bear%20in%20mind%20that%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F507121%22%20target%3D%22_blank%22%3E%40ZdenekHavel%3C%2FA%3E%26nbsp%3B's%20answer%20was%20actually%20incorrect%20since%20the%20apostrophes%20were%20omitted%26nbsp%3B%3CIMG%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fhtml%2F%400277EEB71C55CDE7DB26DB254BF2F52B%2Fimages%2Femoticons%2Flaugh_40x40.gif%22%20alt%3D%22%3Alol%3A%22%20title%3D%22%3Alol%3A%22%20%2F%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hello,

 

I am relatively new in Power Automate and I am trying to create new flows.

 

I have SharePoint List with lost of items.

Then I have form in Sharepoint with one question "ID ?".

StandaK_2-1607884682581.png

(Sorry for Czech language in this screen)

 

I created a flow:

StandaK_0-1607884254669.png

StandaK_1-1607884303510.png

 

When I fill out the form, for example with ID 3, then the flow will start. And what I need from this flow is to insert row number 3 (ID of the row is 3) into the document with all information in that row.

 

Creating the document is working. I tested that. But I do not know how to insert only information from the specific row into document.

 

Can you please someone give me advice ? I tried something but nothing worked.

 

I appreciate any help :-).

Thank you and have a nice evening,

Standa

8 Replies

@StandaK 

Hello,

there is the straightforward way how to do that. In Get Items step, click on "Show advanced option" and then, you must fill 

  • Filter query - to get item with specific ID you must use query: ID eq intVariable (this variable you must get from the form response)
  • Top Count - it's a good idea limit number of responses, in this example set count to 1.

More info about filtering you can found at In-depth analysis into 'Get items' and 'Get files' SharePoint actions for flows in Power Automate | ....

Hello @ZdenekHavel 

 

Thank you for the reply.

I did like you said:

StandaK_1-1607956842859.png

 

 

But there is always error:

StandaK_0-1607956746519.png

Link for error.

 

Any idea what that might be ?

 

Thank you,

best response confirmed by StandaK (Occasional Contributor)
Solution

Hello @StandaK 

 

Filter query must be like this:

ID eq IDVariable

 

ZdenekHavel_0-1608126686254.png

 

@ZdenekHavel @StandaK and the dynamic content in the filter query must have single apostrophes before and after it:

filterQuery3.png

 

The operators in a filter query are:
eq = equals
ne = not equals
gt  = greater than
ge = greater than or equals
lt = less than
le = less than or equals

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Hello @RobElliott and @ZdenekHavel 

 

Thank you both for your help and information. It is working now.

 

To bad I can not mark both of your answers as the best answer :-).

 

Thanks again and wish you the best Christmas ;-).

@StandaK  do bear in mind that @ZdenekHavel 's answer was actually incorrect since the apostrophes were omitted :lol:

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

@RobElliott 

 

You are true about that but he was the first who wanted to help and gave me a direction, which was also important :smile:.

 

And two other things..

  1. It is Christmas so lets give credit to both of you :smile:
  2. And based on his name I think we are neighbors (same country) :lol:

 

Best regards,

Standa