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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Insert or update in da...
Power Apps
Unanswered

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

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,603 Super User 2025 Season 2 on at

    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! 🍻

  • RoberthCB Profile Picture
    on at

    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,603 Super User 2025 Season 2 on at

    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

    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

     

  • Verified answer
    RoberthCB Profile Picture
    on at

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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard