web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Modifying multiple cel...
Power Apps
Unanswered

Modifying multiple cells in 2 tables

(0) ShareShare
ReportReport
Posted on by 49

Hello everyone

I'm trying to do some store application with power apps.

1231.JPGIdea is following, when you're clicking necessary item, detailed info is opening.

In this window you have to select person from drop down menu.

And by clicking Issue Out in table1 quantity should decrease by -1. In another table need to find cell which demonstrate that e.g. Alexey Ivanov received summer coverall and marking date of receipt.

Please advice how to make such functions with one button.

Here are example of tables used

tb2.JPGtb1.JPG

 

 

Categories:
I have the same question (0)
  • KvB1 Profile Picture
    1,596 on at

    I am assuming that your picture is a gallery with the inventory table in the Items property, and that the 'Issue Out' is in this gallery.

     

    Patch(
    	Table1,
    	ThisRecord,
    	{
    		qty: Value(ThisRecord.qty) - 1
    	}
    );;

    This will decrease quantity by 1. If my assumption is false, you need to use a LookUp using the number.

     

    Patch(
    	Table2,
    	LookUp(
    		Table2,
    		name=Dropdown1.Selected.Value
    	),
    	{
    		summercoverall: Today()
    	}
    );;

    This will look for the row with the name selected by the dropdown, then patch the date in the field of summercoverall. If you want to separate the columns keeping track of if he received item and when he received item, you should make a new column, but I hope you get the idea. 

  • Alexey_bot Profile Picture
    49 on at

    Hello, is there possibility to define type automatically, e.g. if boots opened >then boots. if coverall > then coverall? As i understand here only coveral will be marked, and if there possibility to chose type for table 2 according chosen in table 1?

    Patch(
    	Table2,
    	LookUp(
    		Table2,
    		name=Dropdown1.Selected.Value
    	),
    	{
    		summercoverall: Today()
    	}
    );;

     

  • KvB1 Profile Picture
    1,596 on at

    It is not possible to base the column that you want to patch on a dynamic value, eg a variable. It has to be a fixed value.

     

    You can however use an If function on the Today(), to tell the formula that it only has to patch summercoverall if it is selected. 

  • Alexey_bot Profile Picture
    49 on at

    Thank you very much, please advice also is there possibility to change qty cell to selected value, e.g. issued boots were 2 or 3, and you need to write e.g. in form qty issued 2 and it will automatically decrease by 2. Is it possible?

  • KvB1 Profile Picture
    1,596 on at

    Yeah sure, all you need then is a textinput control, and change the formula for table1 to

    Patch(
    	Table1,
    	ThisRecord,
    	{
    		qty: Value(ThisRecord.qty) - Value(TextInput1.Text)
    	}
    );;
  • Alexey_bot Profile Picture
    49 on at

    Thank you, and last question. Will it work if I open detail info for table 2 e.g. i will change names to colums and types in lines, then i ll open detail info for boots or smth other, and then with dropdown menu will chose column with name and make date stamp in cell. is it possible? as I understand it will be fixed value

  • KvB1 Profile Picture
    1,596 on at

    No, but you can patch the column only if detail for that item is opened

    Patch(
    	Table2,
    	LookUp(
    		Table2,
    		name=Dropdown1.Selected.Value
    	),
    	{
    		summercoverall: If(ItemDetail="summercoverall",Today(),NoChange),
    		wintercoverall: If(ItemDetail="wintercoverall",Today(),NoChange),
    		boots: If(ItemDetail="boots",Today(),NoChange)
    	}
    );;
  • Alexey_bot Profile Picture
    49 on at

    Hello, i tried to input this formula to button, but it says me that "ThisRecord" is unknown name in formula, please advice how to solve it?

  • KvB1 Profile Picture
    1,596 on at

    ThisRecord only works when refering to a record in a table (eg in a ForAll function, or in a gallery with a button for that record).

     

    Which formula are you using on which button?

  • Alexey_bot Profile Picture
    49 on at

    I was tryig to use formula that you adviced

    Patch(
    	Table1,
    	ThisRecord,
    	{
    		qty: Value(ThisRecord.qty) - Value(TextInput1.Text)
    	}
    );;

    I have a window with opened detailed information from table,(clicked on arrow), and i want by clicking this button change quantity for this record(increase). Window attached

    dsfds.JPG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 85

#2
WarrenBelz Profile Picture

WarrenBelz 76 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 38 Super User 2026 Season 1

Last 30 days Overall leaderboard