cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jatin
Level: Powered On

patch record in in two google sheet from one screen

Hi there,

 

I have app for price check, currently I get product name and price displayed based on barcode, I have two google sheets (sheet2, sheet3) containing prouct list(3500 items), there are three fields in sheet, "Barcode" "Name" and "Price" I get information using lookup function. Now how can I edit the price and Proucut name as I have two different data source. Any help would be appreciated.  I have attached the screenshot of the screen

 

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: patch record in in two google sheet from one screen

Hi @jatin ,

Please try this:

If(!IsEmpty(Filter(sheet2,BarcodeScanner7.Value in Barcode)),
Patch(sheet2,LookUp(sheet2,BarcodeScanner7.Value in Barcode),{Name:...,Price:....}),
Patch(sheet3,LookUp(sheet3,BarcodeScanner7.Value in Barcode),{Name:...,Price:.....})
)

Note: change "..." to the control name that you use, for example: nametextinput.Text, pricetextinout.Text 

 

Best regards,

Community Support Team _ Phoebe Liu

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.
6 REPLIES 6
Super User
Super User

Re: patch record in in two google sheet from one screen

Hi @jatin 

In a properly constructed database, there should never be a duplication of data.  Your question implies that your database is not normalized correctly.  Please review my posts in the Community Blog regarding relational database principles. Database-Design-Fundamentals-and-PowerApps-An-Overview

Community Support Team
Community Support Team

Re: patch record in in two google sheet from one screen

Hi @jatin ,

Could you tell me

1)the differences between sheet2 and sheet3?

2)the relationship about sheet2 and sheet3?

3)is sheet2 and sheet3 binding with different data sources?

I assume that shee2 and sheet3 have different products and both of them have "Barcode" "Name" and "Price" field.

If so, you could refer this:

If(!IsEmpty(Filter(sheet2,BarcodeScanner1.Value in Barcode)),
Patch(sheet2,Filter(sheet2,BarcodeScanner1.Value in Barcode),{Name:...,Price:....}),
Patch(sheet3,Filter(sheet3,BarcodeScanner1.Value in Barcode),{Name:...,Price:.....})
)

Use if statement to justify whether the barcode is in data source1 or datasource2.

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

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.
Highlighted
jatin
Level: Powered On

Re: patch record in in two google sheet from one screen

Hi @Drrickryp , Thanks for your reply, I do not have data duplication, all barcode values are unique ,the reason I have two sheets because power apps has limit of 2000 rows and I have 3500 products.

 

Thanks for suggestion though

jatin
Level: Powered On

Re: patch record in in two google sheet from one screen

Hi @v-yutliu-msft ,

 

Thanks for your reply, regarding

 

1)the differences between sheet2 and sheet3?

They both have same fields reason behind two sheets is 2000 row limits

2)the relationship about sheet2 and sheet3?

3)is sheet2 and sheet3 binding with different data sources?

no it does not

 

I have tried code you suggested but I am getting error. I have changed barcodescanner number as I have barcodescanner7.

I have attached the screen shot

 

Thanks

 

Community Support Team
Community Support Team

Re: patch record in in two google sheet from one screen

Hi @jatin ,

Please try this:

If(!IsEmpty(Filter(sheet2,BarcodeScanner7.Value in Barcode)),
Patch(sheet2,LookUp(sheet2,BarcodeScanner7.Value in Barcode),{Name:...,Price:....}),
Patch(sheet3,LookUp(sheet3,BarcodeScanner7.Value in Barcode),{Name:...,Price:.....})
)

Note: change "..." to the control name that you use, for example: nametextinput.Text, pricetextinout.Text 

 

Best regards,

Community Support Team _ Phoebe Liu

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.
jatin
Level: Powered On

Re: patch record in in two google sheet from one screen

Hi @v-yutliu-msft ,

 

Thanks very much for your help, I was able to achieve what I wanted, and sorry for not able to understand your instruction at first place as I am very new to power apps.

 

Your been really a good help.

 

Regards,

 

Jatin

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, August 21st at 8am PDT

Top Community Contributors for July 2019

Top Community Contributors for July 2019

Let's thank our top community contributors

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

FifthImage

Dynamics 365 and Power Platform April 2019 Release notes

Features releasing from April 2019 through September 2019!

SixthImage

Power Summit Australia 2019

August 20-23rd 2019

Users Online
Currently online: 77 members 4,186 guests
Please welcome our newest community members: