cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Update Sharepoint list items when click on Submit in Powerapps (Survey App)

Hi All,

Need a help in updating the sharepoint list when I click submit in Survey App created in PowerApps

I created a SP list and from there I created an app using the SP list in PowerApps

Requirement as below.

  1. The survey is supposed to be sent to new joinees after they complete 30 days in the company via an automated email.
  2. Before doing so, I should have a working App, so I created multiple edit forms in Power Apps (screenshots below). However, I failed in achieving the same. Any help is appreciated on this

Need help with the below:

  1. I created a landing page where the employee has to input his EMP ID, he cannot go to next page until employee enter his/her employee id. However, I want to display a message saying "please enter your emp id" when he/she clicks on Start.
  2. In Question1 form, I want the employee to select one option. Want to display a message that "atleast one option should be selected" if they click on next without selecting any option
  3. In Question2 form, when the employee click submit I want those results to be updated in the sharepoint list where I have some details against their employee id. I do not want to create a new item for the survey results in the list. However using Patch () Defaults() i see that two more items were created and the items updated only the questions in the survey but no other details were captured including Employee ID

Below are the screen shots of the list and the app

LandingScrren_Survey.JPGScreenshot1_Survey.JPGScreenshot2_Survey.JPGSP_List_Survey.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Helper III
Helper III

Re: Update Sharepoint list items when click on Submit in Powerapps (Survey App)

Hi @v-monli-msft ,

 

Thanks a lot for the reply.

 

I tried only question 1 for today and it worked like a charm. And it took only a minute to execute it. Really appreciate your help.

 

Will try the second and third questions and respond to you shortly.

 

 

Thanks

Sasi

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Update Sharepoint list items when click on Submit in Powerapps (Survey App)

Hi @sasidhar_mudra ,

 

1. Insert a label control and set its properties to:

Label1.Text="please enter your emp id"
Label1.Visible=V1

Set below formula in OnVisible property of this screen:

Set(V1,false)

Set below formula in OnSelect property of the navigation button in this screen:

If(IsBlank(TextInput1.Text),Set(V1,true),Set(V1,false)&&Navigate(Screen2,None))

2. About second issue you could refer to the first one. 

3. You could use below formula to either create a new item or edit an existing one:

Set(myItem,LookUp(ListName, Title=DataCardValue1.Text));
If(IsBlank(myItem), 
Patch(ListName,Defaults(ListName),{Title: DataCardValue1.Text, ...}),
Patch(ListName,myItem,{...})
)

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper III
Helper III

Re: Update Sharepoint list items when click on Submit in Powerapps (Survey App)

Hi @v-monli-msft ,

 

Thanks a lot for the reply.

 

I tried only question 1 for today and it worked like a charm. And it took only a minute to execute it. Really appreciate your help.

 

Will try the second and third questions and respond to you shortly.

 

 

Thanks

Sasi

View solution in original post

Highlighted
Helper III
Helper III

Re: Update Sharepoint list items when click on Submit in Powerapps (Survey App)

Hi @v-monli-msft ,

 

I was able to execute 2nd step and for 3rd Step i used the below and was successful in updating my sharepoint list.

 

 

Patch(Pulse_Survey_30_Days,LookUp(Pulse_Survey_30_Days,Title=DataCardValue1.Text),Form_Question1.Updates,Form_Question2.Updates);Navigate(FinalScreen, ScreenTransition.Fade)

Thanks a lot for the help 🙂

 

Regards

Sasidhar

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,577)