cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ftavakoli
Level: Powered On

Adding new Data to the excel in the same row

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Adding new Data to the excel in the same row

Hi @ftavakoli,

 

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

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Super User
Super User

Re: Adding new Data to the excel in the same row

What type of fields are Employee, Manager and UniqueID?



--------------------------------------------------------------------------------
If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.
ftavakoli
Level: Powered On

Re: Adding new Data to the excel in the same row

The Employee and Manager are General and UniqueId is Number. 

Community Support Team
Community Support Team

Re: Adding new Data to the excel in the same row

Hi @ftavakoli,

 

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

 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,431)