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

Formulla to update SP list through Powerapp

Hi,

 

I have created PowerApp through SharePoint List. There are few column , which should be update value through one drive excel files.

And should update on SharePoint List with submit powerapp form.

 

Column Type = Currency
                          I have two column customer and currency, on the basis of customer selection on powerapp currency column should autofill and update value on SP list

 

Column Type = Single Line Text

                         On the basis of customer selection through dropdown value, next single line text column of mobile number should autofill in powerapp and update value on SP list

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Bhavuk1987 ,

Collection is a temporary data source in powerapps.

You could save your original data to collection when you run this app.

Since data in collection is all saved in powerapps, so there will be no delegation problem.

But to notice that, collection will be cleared every time you shut down this app.

I suggest you read this doc about collection:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearc...

 

If you do not have any other problems, could you mark my answer as a solution?
Thanks!

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
v-yutliu-msft
Community Support
Community Support

Hi @Bhavuk1987 ,

Do you want to update sharepoint list and get Currency ,mobile number value by selecting customer  in Excel?

Does the excel table has Currency ,mobile number,customer field?

I assume that it has.

Then try this:
1)connect your app with sharepoint list and this excel table

2)insert a drop down to display the customer field

set the drop down's Items:

Distinct(exceltable,customer)
//please replace with your exceltable name

 3)insert a label to display Currency value

set the label's Text:

LookUp(exceltable,customer=drop down1.Selected.Result,Currency)

 4)insert a label to display mobile number value

set the label's Text:

 

LookUp(exceltable,customer=drop down1.Selected.Result,mobile number)

 

 

Then use formula like this to update these two fields:
Patch(listname,Defaults(listname),{Currency:Value(Currencylabel.Text),'mobile number':mobile numberlabel.Text})

//Please replace with your list name,label names and fieldnames.

 

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

I have created powerapp through SP list itself:

 

below are the column type

              Currency = Opening Balance

              Choices = Customer Name

              Single Text = Telephone Number

 Now, one's I select choice column other two column should autofill.

 

I have another connector through my one drive. I have almost 150k customers, in that case once the value came from table1.. SP list update value of that valuedatacard. unfortunately in SP list choice type column , we didn't provide 150k customer as choice. So what formula can be use to update value in SP list

Hi @Bhavuk1987 ,

Please notice two points:

1)if you have 150k records in excel, you will meet delegation problem.

As Excel or one drive is not delegate data source, powerapps could only get at most 2000 records from excel.

Also, you need to change the non-delegation limit to 2000.

delegation.jpg

 To solve this problem, I suggest you firstly save your data source to collection.

In collection there will be no delegation problem.

However, I'm not sure whether a collection could hold 150k records. You need to test by yourself.

 

2)I suggest you not set Customer Name as Choice type in sharepoint list.

If you choose Customer Name in excel that is not in its choice, you can not update successfully.

I suggest you set it to Single Text type.

 

3)set the drop down's Items:

Distinct(exceltable,Customer Name)
//please replace with your exceltable name

set the label1's Text:

LookUp(exceltable,Customer Name=drop down1.Selected.Result,Opening Balance)

set the label2's Text:

LookUp(exceltable,Customer Name=drop down1.Selected.Result,Telephone Number)

Then use formula like this to update these two fields:

Patch(listname,Defaults(listname),{Opening Balance:Value(Currencylabel.Text),'Telephone Number':mobile numberlabel.Text,'Customer Name':drop down1.Selected.Result})

//please replace with your list name, excel name, field names, control names.

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

thanks for your suggestion

 

also please help me to understand data source collection?

Hi @Bhavuk1987 ,

Collection is a temporary data source in powerapps.

You could save your original data to collection when you run this app.

Since data in collection is all saved in powerapps, so there will be no delegation problem.

But to notice that, collection will be cleared every time you shut down this app.

I suggest you read this doc about collection:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-clear-collect-clearc...

 

If you do not have any other problems, could you mark my answer as a solution?
Thanks!

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,313)