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

Power Apps connect to Power Automate to update sharepoint list

Hi

 

I have created a powerapp to record applications for courses. I have a button on the detail screen which when pressed sends the details to the enrolment team to set up on the dedicated learner system. I also want the button to put the current date and time in the Date Forwarded to Enrolments column in sharepoint. What I cant get is how to link the data record on the power automate flow. I tried setting up by putting the ID in the Update Item as Ask Powerapps but that doesnt work, and then tried creating an initialize variable of the "Title" to use for the ID in the sharepoint, but it comes up with an error message which does not make any sense?

 

Can any one help or point me in the right direction (i.e. video / guide online).

 

Thanks

8 REPLIES 8
Expiscornovus
Super User
Super User

Hi @davidessex,


Can you share a screenshot of the setup of your current flow and the error you mentioned? 

Hi

 

Here is the flow and the error message that comes up:

davidessex_2-1655972142688.png

davidessex_1-1655972062945.png

 

The unique ID field is the Your Email Address in the list which Power Apps connects to, as this will never have the same address twice as applicants will only be able to apply once for the course.

 

Thanks

 

Dave

Expiscornovus
Super User
Super User

Hi @davidessex,

 

When you use the update item Microsoft expects you to use the ID value in the ID field. This is a system wide column. You can show that column in your view.

 

Below is an example of where you can find the id.

id_systemcolumn.png

 

However in your setup you want to match based on email address. In that case you probably want to use a Get Items to filter for the correct entry (based on e-mail) and retrieve that ID dynamically.

 

Are you storing the e-mail address in a separate field in the HSC Applications list or do you just want to use the created by?

Its a separate field in HSC Applications List

Expiscornovus
Super User
Super User

Hi @davidessex,

 

In that case you can use something like below.

 

1. Add a Get Items. Use the Filter Query to find the record with the value from YourEmailAddress

In my sample the Email address field was named EmailAddress. You need to update that for your setup.

EmailAddress eq '@{triggerBody()['text']}'

 

2. Add a Condition action. Check if there is exactly one match.

length(body('Get_items')['value'])

 

3. Add the Update Item in the If Yes. Use the following expression to retrieve the Id value dynamically:

body('Get_items')['value'][0]['Id']

 

matchitem_withgetitems.png

Hi

 

Seem to fall over at the first hurdle

 

I added YourEmailAddress eq '@{triggerBody()['text']}' as above changing EmailAddress to YourEmailAddress

 

And I get this

davidessex_0-1655987487606.png

 

 

Expiscornovus
Super User
Super User

Hi @davidessex,

 

Sorry, I should have explained.

 

You can either paste the whole value as text directly in the field:

EmailAddress eq '@{triggerBody()['text']}'

 

Or type the first part and add the expression part of the value via the expression editor:

triggerBody()['text']

 

Hi

 

Thanks for your help - i  could not get it to work as you said, so I undhid the ID from list, added it to the app and used this to connect and update the date in the list. It now works.

Helpful resources

Announcements
Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on August 17, 2022 at 8am PDT.

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,774)