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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Adding new Data to the...
Power Apps
Answered

Adding new Data to the excel in the same row

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have excel stored in Google Drive as my data Scource. In my excel I have (TINumber, CustomerName, SupportDepartment, From, To,Details, Category, Employee, Manager, and UniqueId). In the app I have a DataForm which only includes: TINumber, CustomerName, SupportDepartment, Category, From, To, and Details to ask the user to fill these fields. However, When I want to store them I want to add the Employee , Manager and UniqueId to the same record as well. I tried :

 

SubmitForm(NewEntry);
Patch(SubmissionForm, Defaults(SubmissionForm),
{
    TINumber: DataCardValue2,
    Details: DataCardValue6,
    CustomerName: DataCardValue5,
    From: DateAdd(FromDate, TimeZoneOffset(FromDate), Minutes),
    To: DateAdd(ToDate, TimeZoneOffset(ToDate), Minutes),
    SupportDepartment: DataCardValue7.Selected.Value,
    Category: DataCardValue8.Selected.Value,
    Employee: MyEmail,
    Manager: DefaultManagerEmail,
    UniqueID: NewUniqueID+1
        }
); 

 

Which is creating 2 seperate rows. (attached screenshot) 

I tried to use only either Patch or SubmitForm but nothing. 

 

I will be more than happy if anyone could help me out regarding this issue. 

Capture2.PNG
Categories:
I have the same question (0)
  • Jeff_Thorpe Profile Picture
    6,085 Super User 2024 Season 1 on at

    What type of fields are Employee, Manager and UniqueID?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    The Employee and Manager are General and UniqueId is Number. 

  • Verified answer
    v-monli-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    In PowerApps, if you want to create one record, you whether use the SubmitForm function, or use the Patch. If you use both at one time, then of course it will create 2 records.

     

    For your case, the formula should be:

     

    Patch(TableName, Defaults(TableName),
    {
     TINumber: DataCardValue2.Text,
     Details: DataCardValue6.Text,
     CustomerName: DataCardValue5.Text,
     From: ?,
     To:?,
     SupportDepartment: DataCardValue7.Selected.Value,
     Category: DataCardValue8.Selected.Value,
     Employee: ?,
     Manager: ?,
     UniqueID: ?
     }
    )

     

     

    I'm not sure that you value you need in the From/To/Employee/Manager/UniqueID fields. It seems that you want to have date value in the From/To fields. If so, you can have date picker controls, and then the formula should be:

     From: DatePicker1.SelectedDate,
     To: DatePicker2.SelectedDate,

    For Employee/Manager/UniqueID, you need to use something that could be recoginized by PowerApps. For example it could be:

     

    Employee:"XXX@XXX.com",
        Manager: "XXX@XXX.com",
        UniqueID: Value(TextInput1.Text)

     

    Regards,

    Mona

     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard