Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Insert or update in dataverse from Power Apps

(0) ShareShare
ReportReport
Posted on by

Hello, I need your great help for a Power Apps issue, I have a collection that only has two fields KEYGL and JUSTIFICATION and I need to insert or update the information in a Dataverse table, however, I get an error and I can't find a way to do it. To do so, the KEYGL field is the key (text) and JUSTIFICATION is text as well.

Thank you very much for the help.

 

Regards

  • Verified answer
    RoberthCB Profile Picture
    on at
    Re: Insert or update in dataverse from Power Apps

    At the moment i have a solution: pass the data to power automate and insert or update to Dataverse from there

  • RoberthCB Profile Picture
    on at
    Re: Insert or update in dataverse from Power Apps

    Thanks i change but i have this message, the collection have some records

     

    RoberthCB_0-1718291748080.png

    RoberthCB_1-1718291772662.png

     

    Thanks for the help

     

  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: Insert or update in dataverse from Power Apps

    Hi @RoberthCB 

     

    I see you are using semi-colon  and not comma.

    But in your last patch you are using a comma. 

     

    The code should be:

    // Create a collection to store updated values
    ForAll(
     Filter(
     GallJustifica.AllItems;
     TogModifica.Value
     ) As ChangedRows;
     Patch(Coldatos;
     Defaults(Coldatos); {
     KeyGL : ChangedRows.Key.Text;
     Descripcion : "";
     Justificacion : ChangedRows.InputJustifica.Text
     })
    );;
    
    Patch('Varianzas GLS'; Coldatos);;

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube| [My blog]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • RoberthCB Profile Picture
    on at
    Re: Insert or update in dataverse from Power Apps

    Thsis the code, but the moment i´m triyng to use Patch for insert

     

    // Create a collection to store updated values
    ForAll(
        Filter(
           GallJustifica.AllItems;
            TogModifica.Value
        ) As ChangedRows;
        Patch(Coldatos;
        Defaults(Coldatos); {
            KeyGL : ChangedRows.Key.Text;
            Descripcion : "";
            Justificacion : ChangedRows.InputJustifica.Text
        })
    );;
    Patch('Varianzas GLS', Coldatos);
     
    the error message is in the patch
     
     
    RoberthCB_3-1718228924693.png

    Thanks a lot

     

     

  • SpongYe Profile Picture
    5,580 Super User 2025 Season 1 on at
    Re: Insert or update in dataverse from Power Apps

    Hi @RoberthCB 

     

    What kind of error are getting?

    It would also be nice if you share the code for insert or update the information in a Dataverse table.

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube| [My blog]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,670 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,011 Most Valuable Professional

Leaderboard