cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Data not transferring to excel

Everything is transfering exept for the date.  The excel cell is simply blank.

 

If make the DataField into "Activation_Date" instead of Activation_Date, then I get the error in the red bar.

 

How can I fix this?

 

error.png

1 ACCEPTED SOLUTION

Accepted Solutions
hpkeong
Community Champion
Community Champion

Hi @Anonymous

 

I suppose you are not using Submit(Form), otherwise it will not have such problems as Submit (Form) is built-in function.

But if you are using Patch(), so as @AndyPennell mentioned, use Text to convert into a string.

 

Text(DatePicker.SelectedDate, "dd mmm, yyyy") will do.

 

This tutorial helps.

https://powerapps.microsoft.com/en-us/tutorials/function-text/

 

Hope this helps.

TQ

hpkeong

View solution in original post

7 REPLIES 7
AndyPennell
Power Apps
Power Apps

The error says it is expecting a string, so I would use the Text function to convert the date into a string before pushing to Excel.

Anonymous
Not applicable

Where would the Text function be inserted?  Into the Update field?

hpkeong
Community Champion
Community Champion

Hi @Anonymous

 

I suppose you are not using Submit(Form), otherwise it will not have such problems as Submit (Form) is built-in function.

But if you are using Patch(), so as @AndyPennell mentioned, use Text to convert into a string.

 

Text(DatePicker.SelectedDate, "dd mmm, yyyy") will do.

 

This tutorial helps.

https://powerapps.microsoft.com/en-us/tutorials/function-text/

 

Hope this helps.

TQ

hpkeong

View solution in original post

Anonymous
Not applicable

I was using the Sumbit(form).  Oddly, the form had two tiles titled the same so I just turned on the second one for the date and it works.

valuehr
Helper I
Helper I

I have tried this posted solution, but my data is still not writing to Excel.  The posted solution is not clear exactly which property this solution is supposed to be added.

 

Is the Text(DatePicker.SelectedDate, "dd mmm, yyyy" solution supposed to be added to the DatePicker, to the Gallery, to the OnSelect property or something else?  If it's to be to the DatePicker, there is no "Text" property to the DatePicker.

 

I am using the Patch function on a custom gallery to get my data to write to Excel.

 

Please help!  I have tried so many things and nothing is helping.  I get the same error message as this user.

 

 

 

 

Anonymous
Not applicable

Here's what I did.

 

1.) Make sure there's only 1 field active. (My for some reason has two "Activation" showing)  

2.) Activate the field card and delete the input field in it

3.) With the card selected, click Insert > Controls > Date Picker

4.) Change the "Update" field of the card to DatePicker#.SelectedDate

 

 

This works for me and is now putting in the Date into my Excel file. 

I tried your suggestion. It is still not writing to Excel.  The example of the pic posted is not from me.  It's from another user, but I am having the same problem.

 

Update:  This actually worked!  I put the coding in the wrong area.  I tried it this morning, and it worked.  Happy days!

 

Thank you.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,156)