cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kavya__
Frequent Visitor

Updating selected columns of a Sharepoint list from powerapps forms

Hi, I'm trying to update only specific columns of my sharepoint list.


app.PNGthis is the snapshot of the app, I've created this form by connecting it to my list. 'your name' here is referred to as 'user name' in the list , and I wish to update the other columns if the 'user name' matches with 'your name' from this form. 

 

 

 

 

 

I'm also attaching my sharepoint list's snapshot. Wish to update - engagement, update type and last updated.

 

I would be really grateful for your help.

Thanks in advance.

 

 

8 REPLIES 8
WarrenBelz
Super User
Super User

@kavya__ ,

I answered your previous identical post here - can you please close this one. I am in a different timezone to you I suspect.

kavya__
Frequent Visitor

@KrishnaV ,

 

Read a couple of your suggestions on similar post, could you help out ? Kind of urgent.

 

Thanks in advance.

@kavya__ ,

Happy to leave you with @KrishnaV on both posts - but I am sure I can help you if I can understand exactly what you want. You have not responded to my question on the other post.

 Hey @WarrenBelz ,

 

I'm really sorry just checked your reply on the other post, missed it earlier. Let me re-iterate the problem to you here.

 

I've a SharePoint List with columns - User Name(Title field was renamed to user name) , Engagement, Update Type ( Choice column Daily,Weekly), and Last Updated. The User Name column has 40 distinct records.

I've created a form in powerapps from the same sharepoint List. Now, I want when the user fills the form:
> The columns - Engagement ,Update type and last updated gets updated.
> The user name(title) field is only present in my sharepoint list and if the user().fullname matches with any record in this column (i.e with any of the 40 names ) then the the other columns get updated.

 

currently a new record is being created.

 

Thanks.

 

 

 

 

 

 

Ok @kavya__ ,

Whether a new record is created on SubmitForm() depends on the DefaultMode of the form, so yours must be FormMode.New (hence a new record is created).

Instead of SubmitForm, you can use Patch with something like this

With(
   {wUserName:User().FullName},
   If(
      YourTitleBoxName.Text = wUserName, 
      Patch(
         YourListName,
         {Title:wUserName},
         {
            Engagement:wUserName,
            'Update Type:YourUpdateTypeControl.Selected.Value
            'Last Updated':Today()
         }
      ),
      SubmitForm(YourFormName)
   )
)

 meaning if the record matched, it would update the existing record, but if not, create a new record (assuming the DefaultMode of the Form is New).

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

 

ya was thinking something on the similar lines. This should've worked but some error has occured, I even tried removing the 'update type' to check if everything else is fine but no luck.

kavya___0-1600328743505.png

 

 

After removing update type:

 

kavya___1-1600328865471.png

 

 

@kavya__ ,

Firstly, what type of field is UpdateType in your list and what are the Items of DataCardValue7?

Also, can you supply you code as text so I can look at it properly and what item is the second error showing under?

 

Hi @kavya__ ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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