cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ali20
Regular Visitor

Add value to same row in excel using Icon/Button

Hello everyone,

I’m trying to build this app for case documentation, but I struggle in this step. I want to add a new case and the feedback on it to the same form.

My goal is to get this data written to an excel file in the same row like this>

ali20_0-1655158290066.png

 

 

ali20_1-1655158290094.png

 

 

But when I click on the smiley face, it creates a new record in a new row as following>

ali20_2-1655158290096.png

 

 

I’m using this formula>

ali20_3-1655158290098.png

 

 

Can you please help me, how should I get this done, and which formula to use?

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @ali20 ,

 

I have made a test for your reference.

 

Here is my App.

Set(variableTB,"1");Set(variableMB,"");Set(variableBB,"")
Set(variableMB,"1");Set(variableTB,"");Set(variableBB,"")
Set(variableBB,"1");Set(variableTB,"");Set(variableMB,"")
Patch(datasource,EditForm1.LastSubmit,{'Tob Box':variableTB,'Middle Box':variableMB,'Buttom Box':variableBB});Set(variableTB,"");Set(variableMB,"");Set(variableBB,"")

vyujincuimsft_0-1655690718613.png

Result Screenshot:

vyujincuimsft_1-1655690924057.png

 

 

 

Best Regards,

Charlie Choi

View solution in original post

11 REPLIES 11
Sunil-Narnaware
Solution Supplier
Solution Supplier

@ali20 , when you are patching the new record, make sure you are passing the required field values everytime.. in your case you are just passing values for 'Tob Box' field and not others.. so add all the other fields and it should work.. but if you are patching an existing record then first you have to find that record and patch it..

Hi Sunil, thanks for your reply. I am already passing field values for columns.
Here what I want to achieve: 
1- Enter data in the app
2- Select one of the smiley faces (Which should add value "1" to excel after I save all)
3 Select Save

Sunil-Narnaware
Solution Supplier
Solution Supplier

@ali20 when you hit Save, what is the action you are doing? can you share that code ?

ali20
Regular Visitor

I have this:

Screenshot_20220614-010548_Chrome.jpg

Sunil-Narnaware
Solution Supplier
Solution Supplier

@ali20 but above you mentioned about Patch statement.. can you please share the purpose of it? How is your smiley thing tied to rating?

Hi Sunil, 

It's not an action for rating, but I use this to get the input "1" in the excel sheet where I have another table connected to this column to calculate the total user's numbers/performance based on the feedback he got from the customers.

 

So, as mentioned above my goal is to get this data written to an excel file in the same row like this>

ali20_0-1655215768446.png

 

  

ali20
Regular Visitor

@CarlosFigueira Can you please help here?

v-yujincui-msft
Community Support
Community Support

Hi @ali20 ,

 

You need to specify the record you just submitted for the Patch() function.

I have made a test for your reference.

 

Here is my App.

Set(variableTB,"1")
Patch(datasource,EditForm1.LastSubmit,{'Tob Box':variableTB});Set(variableTB,"")

vyujincuimsft_0-1655438379308.png

Result Screenshot:

vyujincuimsft_1-1655438487714.png

 

 

Best Regards,
Charlie Choi

Hi @v-yujincui-msft ,
thank you so much for your help. That's whated I want to do. I still have one quetion, how to do I get every varible under its column. For example: 
Set(variableTB,"1") > put the value in column "Tob Box"

Set(variableMB,"1")> put the value in column "Middle Box"

Set(variableBB,"1")> put the value in column "Buttom Box"

 

To be Like this:

ali20_0-1655479185282.png

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,735)