Forum Discussion

zlasek's avatar
zlasek
Copper Contributor
Jul 07, 2023

PowerApp: Want Edit Form to Update Columns

Hello,

 

I am practicing using forms in PowerApps that update columns in a table with values inputted in the app itself. Right now all input into the app creates a new row instead of filling into the columns on the table. The 4th and 5th rows were expected to join to the 1st and 2nd when that information was entered into the app. Does anyone know what I may be doing wrong or if there is even a way to do this?

 

My original direction was finding a way to write all inputted approval data into a new table with the order number included and then would just join the order info table with the approval info table later on. Maybe this is what I should look into? Would love an outside perspective, thanks!

 

  • Lalit Mohan's avatar
    Lalit Mohan
    Iron Contributor

    Hi zlasek 

    It seems like you're encountering an issue with your PowerApp form where all input creates new rows instead of updating existing columns in a table. To resolve this, you can follow these steps:

    1. Check the data source: Ensure that the data source you're using in your PowerApp is the correct table where you want the updates to occur. Verify that the table structure aligns with the columns you're trying to update.

    2. Set the form's Item property: In PowerApps, make sure that the form's Item property is set to the specific row you want to update. You can achieve this by using a formula like Lookup(Table, Condition) to find the row based on a unique identifier (e.g., order number).

    3. Bind form controls to table columns: For each input control in your form, set its Update property to the corresponding column in the table. This will ensure that the values entered in the form are updated in the appropriate columns.

    4. Submit the form: Make sure that you have a submit button or an action to trigger the update process. In the button's OnSelect property, use the Patch function to update the selected row in the table. The Patch function would look something like: Patch(Table, form.Selected, {Column1: TextInput1.Text, Column2: TextInput2.Text}). Adjust the formula based on the specific columns and controls in your form.

    5. Test the app: Try submitting the form with new inputs and see if the existing rows are updated instead of creating new ones.

    Regarding your idea of creating a separate table for approval data and later joining it with the order info table, that can also be a valid approach. You can store the approval data in a separate table and establish a relationship with the order info table using a common identifier (e.g., order number). This would allow you to query and display the related data when needed.

    Remember to save and publish your PowerApp after making these changes, and always test thoroughly to ensure the desired behavior. Good luck with your PowerApp development!

     

Resources