Hi all,
I want to substract a number from a table. This number is added by the user so I want to substract to my initial number of the table this user's number. This operation must be in a button with the submitform of more things to the table I've got.
I add an image to try to explain it.
Lots of thanks.
Solved! Go to Solution.
Hi @AlesonITC,
When new items come in, you can adjust the inventory by putting the correct quantity now in stock into the TextInput Control and click the button. The new total will be reflected in the Datatable.
I am trying something like this:
SubmitForm(Form1);;UpdateContext(DataTable2.Selected.Quantity = DataTable2.Selected.Quantity - Value(TextInput1.Text));;ResetForm(Form1)
But it doesn't work
No one can help me?
Hi @AlesonITC,
Which part is the form that you are trying to submit? In below image, the blue part or the yellow part? It seems to me that the blue part is the edit form and yellow part is a data table control. Is that true?
If so, what is the data source of the data table? Is it the same one as the edit form? I assume that there should be 2 different data sources, since in your screenshot, both data table and form have the same column named Quantity, but the values are different.
Selecting Add Sale would update the records from edit form(DataSource1), but it won't change the data in data table(DataSource2).
Please explain your situation more clearly so that we could help.
Regards,
Mona
Hi @v-monli-msft thanks for answer, the thing I'm trying to do is update the number which I select to make the insert of the sale and substract the quantity number of the textImput (the blue part, the number 3) to the DataTable on the conection to SQL server, and then update this showTable (yellow part).
Doing this, I would get a number 7 on watermelon after a refresh of the datatable.
The app works:
1.- Tap or select an employee
2.- Tap or select a fruit
3.- Write the number of fruits that vendor sells to a client.
4.- Submit form, it saves on a SQL Table the vendor id, the fruit id, the date and the number of fruits sold.
5.- Update the table substracting the number of fruits to the old number.
It works all nice but the last point. I don't know what function use, tried with update, patch, updatecontext...
Lots of thanks
Anyone can help me please?
I will be very grateful.
Thanks.
Still need help please
Hi @AlesonITC,
When new items come in, you can adjust the inventory by putting the correct quantity now in stock into the TextInput Control and click the button. The new total will be reflected in the Datatable.
Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.
Did you miss the call?? Check out the Power Apps Community Call here!
User | Count |
---|---|
273 | |
209 | |
76 | |
43 | |
38 |
User | Count |
---|---|
350 | |
225 | |
118 | |
72 | |
54 |