Skip to main content

Notifications

Power Apps Pro Dev & ISV
Unanswered

Creating an Object in a Table Based on Data Selected in a Form

Posted on by
I want to create an object in a table on my PowerApps page using 3 Text Inputs that are connected to two different tables (Appareil and Activité). Additionally, there are two Date Inputs: the first one captures the Month and Year, while the second one captures the Day, Month, and Year. Based on the selected data from these inputs, the object will be created in the respective table.
  • Suggested answer
    Nandit Profile Picture
    Nandit 752 on at
    Creating an Object in a Table Based on Data Selected in a Form
     
    When you say you want to create an object, do you mean creating a new record in your Data Source?
    If yes, you can use the following code (modify it based on your control names) and it should create a record -
    ​
    Patch(DataSource,
          Defaults(DataSource), {
          DateColumn: DateControl.SelectedDate
    TextColumn: TextInput.Value
    .
    .
    .
    and so on
    })
    
    ​
    Hope this helps. 
     
    Kind regards, 
    Nandit
     
    If this answers your query, please mark this response as the answer.
    If its helpful, please leave a like. Thanks!
     
     
     

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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,122

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,414

Leaderboard