SOLVED

cannot get the ID of the seleted item

%3CLINGO-SUB%20id%3D%22lingo-sub-858793%22%20slang%3D%22en-US%22%3ERe%3A%20cannot%20get%20the%20ID%20of%20the%20seleted%20item%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-858793%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410208%22%20target%3D%22_blank%22%3E%40sabrinekalboussi%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETry%20putting%20the%26nbsp%3B%3CSTRONG%3EFieldId%3C%2FSTRONG%3E%26nbsp%3Bvalue%20from%20%22For%20a%20selected%20file%22%20into%20a%20variable%20and%20then%20use%20the%20variable%20in%20%22Get%20files%20(properties)%22%20action.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESample%20image%20below.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20621px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132133iBB2FE5AAE225F35C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Untitled.png%22%20title%3D%22Untitled.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20hope%20this%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENorm%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-860527%22%20slang%3D%22en-US%22%3ERe%3A%20cannot%20get%20the%20ID%20of%20the%20seleted%20item%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-860527%22%20slang%3D%22en-US%22%3EYou%20cannot%20use%20selected%20item%20with%20a%20powerapps%20trigger%20like%20that.%20What%20you%20need%20to%20do%20is%20pass%20the%20identifier%20via%20powerapps.%20So%20for%20that%20ID%20in%20get%20File%20you%20use%20the%20%E2%80%9Cask%20in%20powerapps%E2%80%9D%20option%20in%20the%20identifier%20field.%20This%20way%20when%20you%20call%20the%20flow%20you%20can%20use%20the%20selected%20item%20identifier%20from%20powerapp%20when%20calling%20the%20flow.%20%3CBR%20%2F%3E%3CBR%20%2F%3EAn%20i%20understanding%20this%20is%20what%20your%20doing%20by%20making%20a%20button%20call%20a%20flow%20from%20the%20app%20right%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-861110%22%20slang%3D%22en-US%22%3ERe%3A%20cannot%20get%20the%20ID%20of%20the%20seleted%20item%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-861110%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20for%20your%20reply%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F869%22%20target%3D%22_blank%22%3E%40Chris%20Webb%3C%2FA%3E%3B%20I%20am%20still%20lost%20because%20It%20looks%20like%20I%20am%20not%20doing%20things%20in%20the%20good%20orders...I%20am%20going%20to%20explain%20by%20screenshots...%26nbsp%3B%20In%20fact%2C%20when%20I%20select%20an%20item%20in%20my%20share%20point%20list%20and%20click%20on%20edit%2C%20I%20have%20a%20button%20%22Send%20Letter%20test%22%20(step1).%20When%2C%20I%20click%20on%20it%2C%20I%20need%20to%20update%20a%20word%20document%20according%20to%20the%20selected%20line%20(item)%20values%20and%20then%20to%20send%20it%20by%20email%20to%20Attendee.%20I%20have%20created%20a%20flows%20as%20follows%20(step%202)%2Cbut%20I%20cannot%20get%20the%20selected%20item%20in%20the%203th%20step%20as%20you%20can%20see%20in%20the%20screenshot.%20I%20have%20got%20automatically%20apply%20to%20each%203%20in%20GET%20ITEM%20step%20when%20I%20put%20the%20ID%20(for%20the%20selected%20Item)%20in%20the%20Id%20field...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-861113%22%20slang%3D%22en-US%22%3ERe%3A%20cannot%20get%20the%20ID%20of%20the%20seleted%20item%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-861113%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F869%22%20target%3D%22_blank%22%3E%40Chris%20Webb%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-862109%22%20slang%3D%22en-US%22%3ERe%3A%20cannot%20get%20the%20ID%20of%20the%20seleted%20item%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-862109%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F410208%22%20target%3D%22_blank%22%3E%40sabrinekalboussi%3C%2FA%3E%26nbsp%3B%20Sorry%20meant%20to%20click%20reply%20not%20mark%20best%20answer%20%3A(.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnyway%2C%20You%20should%20just%20have%20a%20flow%20like%20show.%20Inside%20powerapps%20when%20editing%20the%20form%2C%20select%20the%20button%20then%20on%20action%20tab%2C%20is%20flow.%20Create%20a%20flow%2C%20then%20you%20just%20need%20to%20go%20into%20the%20ID%20field%20and%20click%20the%20ask%20in%20powerapps.%20Then%20update%20The%20file%20properties%20column%20you%20need%20updated.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20736px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F132459iE0760C495CB2793F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22flowbut.JPG%22%20title%3D%22flowbut.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20I%20ask%20a%20few%20questions.%20Why%20flow%20in%20this%20case%3F%20Are%20you%20doing%20something%20to%20update%20a%20column%20instead%20of%20just%20having%20the%20form%20itself%20update%20the%20data%20on%20the%20item%20you%20are%20editing%3F%20Or%20am%20I%20missing%20something%20here.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-862945%22%20slang%3D%22en-US%22%3ERe%3A%20cannot%20get%20the%20ID%20of%20the%20seleted%20item%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-862945%22%20slang%3D%22en-US%22%3E%3CP%3EMany%20thanks%20for%20your%20help%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F869%22%20target%3D%22_blank%22%3E%40Chris%20Webb%3C%2FA%3E.%20%3A)%3C%2Fimg%3E%20I%20have%20managed%20to%20solve%20the%20issue%20and%20to%20run%20successfully%20my%20flow.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHave%20a%20nice%20day%20%3A)%3C%2Fimg%3E%20Sabrine%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-858573%22%20slang%3D%22en-US%22%3Ecannot%20get%20the%20ID%20of%20the%20seleted%20item%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-858573%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20PowerApps%20Team%2C%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EI%20am%20a%20beginner%20in%20Sharepoint%20and%20I%20need%20to%20use%20PowerApps%20and%20flows%20to%20update%20a%20word%20document%20value%20and%20to%20send%20it%20after%20that%20by%20email.%20More%20specifically%2C%20for%20a%20selected%20item%20in%20the%20Sharepoint%20List%2C%20when%20I%20click%20in%20the%20edit%20Ribon%2C%20I%20have%20a%20%22send%20letter%22%20button%20(in%20the%20edit%20mode%20only).%20When%20I%20click%20on%20it%2C%20I%20need%20to%20use%20the%20data%20of%20the%20selected%20item%20to%20fulfill%20the%20document%20and%20then%20to%20send%20it.%20I%20am%20struggling%20in%20the%20first%20part%20of%20the%20flow%20because%26nbsp%3B%20I%20cannot%20use%20the%20ID%20of%20the%20selected%20item%20as%20an%20(Id)%20in%20the%20(get%20item)%20step.%20How%20should%20I%20deal%20with%20this%3F%20(see%20attached%20screenshot).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3ESabrine%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-858573%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGet%20Item%20issue%20in%20PowerApps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Contributor

Hello PowerApps Team,


I am a beginner in Sharepoint and I need to use PowerApps and flows to update a word document value and to send it after that by email. More specifically, for a selected item in the Sharepoint List, when I click in the edit Ribon, I have a "send letter" button (in the edit mode only). When I click on it, I need to use the data of the selected item to fulfill the document and then to send it. I am struggling in the first part of the flow because  I cannot use the ID of the selected item as an (Id) in the (get item) step. How should I deal with this? (see attached screenshot).

 

Thanks,

Sabrine

6 Replies

Hi @sabrinekalboussi,

 

Try putting the FieldId value from "For a selected file" into a variable and then use the variable in "Get files (properties)" action.

 

Sample image below.

Untitled.png

I hope this helps.

 

Norm

You cannot use selected item with a powerapps trigger like that. What you need to do is pass the identifier via powerapps. So for that ID in get File you use the “ask in powerapps” option in the identifier field. This way when you call the flow you can use the selected item identifier from powerapp when calling the flow.

An i understanding this is what your doing by making a button call a flow from the app right?

Thanks for your reply @Chris Webb; I am still lost because It looks like I am not doing things in the good orders...I am going to explain by screenshots...  In fact, when I select an item in my share point list and click on edit, I have a button "Send Letter test" (step1). When, I click on it, I need to update a word document according to the selected line (item) values and then to send it by email to Attendee. I have created a flows as follows (step 2),but I cannot get the selected item in the 3th step as you can see in the screenshot. I have got automatically apply to each 3 in GET ITEM step when I put the ID (for the selected Item) in the Id field...

best response confirmed by Chris Webb (MVP)
Solution

@sabrinekalboussi  Sorry meant to click reply not mark best answer :(. 

 

Anyway, You should just have a flow like show. Inside powerapps when editing the form, select the button then on action tab, is flow. Create a flow, then you just need to go into the ID field and click the ask in powerapps. Then update The file properties column you need updated. 

 

flowbut.JPG

 

Can I ask a few questions. Why flow in this case? Are you doing something to update a column instead of just having the form itself update the data on the item you are editing? Or am I missing something here. 

Many thanks for your help @Chris Webb. :) I have managed to solve the issue and to run successfully my flow.

 

Have a nice day :) Sabrine