SOLVED

cannot get the ID of the seleted item

Copper 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 VI_Migration (Silver Contributor)
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

1 best response

Accepted Solutions
best response confirmed by VI_Migration (Silver Contributor)