cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Upload Collection To sharepoint List Date/Time Error

Hello, I am new to poweapps and have not been able to get around this one error. 

Purpose of App: 3 different teams will input variables all related to the same quotes. These will be in a sharepoint list. Currently: Add new detail-->Add to collection-->Review entire collection-->upload Collection of new details to sharepoint list.

Error: When submitting entire collection to sharepoint list the date/time will not upload properly. (see picture below)

Code: ForAll(AddDetail,Patch('Test List', Defaults('Test List'),{ProjectName: ProjectName, ProductNumber: ProductNumber, ProductName: ProductName, SO: SO, Variants: Variants, DateAddedToFile: DateAddedToFile, SubmittedBy: SubmittedBy}))


AddDetail = Collection

'Test List' = Sharepoint List
ex. ProjectName: ProjectName = Sharepoint Column: Collection Column

Sumbit to sharepoint error.PNG


 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Support
Community Support

HI @jbaggett ,

According to the issue that you mentioned, I think this issue may be related to the "DateAddedToFile" column. PowerApps could not recognize the "DateAddedToFile" column is from AddDetail or 'Test List' data source.

 

Based on the issue you mentioned, I think the Disambiguation operator (@) could fix your issue. Please consider modify your formula as below:

ForAll(
AddDetail,
Patch(
'Test List',
Defaults('Test List'),
{
ProjectName: AddDetail[@ProjectName],
ProductNumber: AddDetail[@ProductNumber],
ProductName: AddDetail[@ProductName],
SO: AddDetail[@SO],
Variants: AddDetail[@Variants],
DateAddedToFile: AddDetail[@DateAddedToFile],
SubmittedBy: AddDetail[@SubmittedBy]
}
)
)

More details about the Disambiguation operator (@), please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators#disambiguation-oper...

 

In additon, please make sure the "DateAddedToFile" column in your AddDetail or 'Test List' data source has same data type.

 

Best regards,

Community Support Team _ Kris Dai
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

Highlighted

Hi @jbaggett ,

Is the "DateAddedToFile" column a Date time type column in your SP List?

Is the "DateAddedToFile" column a String type value in your Collection?

 

If the "DateAddedToFile" column a Date time type column in your SP List, please consider modify your formula as below (set the OnSelect property of the "Submit" button to following😞

ForAll(
AddDetail,
Patch(
'Test List',
Defaults('Test List'),
{
ProjectName: AddDetail[@ProjectName],
ProductNumber: AddDetail[@ProductNumber],
ProductName: AddDetail[@ProductName],
SO: AddDetail[@SO],
Variants: AddDetail[@Variants],
DateAddedToFile: DateTimeValue(AddDetail[@DateAddedToFile]), /* <-- Modify formula here */
SubmittedBy: AddDetail[@SubmittedBy]
}
)
)

If the the "DateAddedToFile" column a Date only type column in your SP List, please modify above formula as below:

ForAll(
AddDetail,
Patch(
'Test List',
Defaults('Test List'),
{
ProjectName: AddDetail[@ProjectName],
ProductNumber: AddDetail[@ProductNumber],
ProductName: AddDetail[@ProductName],
SO: AddDetail[@SO],
Variants: AddDetail[@Variants],
DateAddedToFile: DateValue(AddDetail[@DateAddedToFile]), /* <-- Modify formula here */
SubmittedBy: AddDetail[@SubmittedBy]
}
)
)

Please consider take a try with above solution formula, then check if the issue is solved.

 

Please also make sure the DateAddedToFile column is a proper Date time type column or Date only type column in your SP List.

 

Best regards,

Community Support Team _ Kris Dai
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

11 REPLIES 11
Highlighted
Anonymous
Not applicable

Hello,

 

Is your DateAddedToFile a date picker control?  If so,  it should be referenced with DateAddedToFile.SelectedDate.

Highlighted
Community Support
Community Support

HI @jbaggett ,

According to the issue that you mentioned, I think this issue may be related to the "DateAddedToFile" column. PowerApps could not recognize the "DateAddedToFile" column is from AddDetail or 'Test List' data source.

 

Based on the issue you mentioned, I think the Disambiguation operator (@) could fix your issue. Please consider modify your formula as below:

ForAll(
AddDetail,
Patch(
'Test List',
Defaults('Test List'),
{
ProjectName: AddDetail[@ProjectName],
ProductNumber: AddDetail[@ProductNumber],
ProductName: AddDetail[@ProductName],
SO: AddDetail[@SO],
Variants: AddDetail[@Variants],
DateAddedToFile: AddDetail[@DateAddedToFile],
SubmittedBy: AddDetail[@SubmittedBy]
}
)
)

More details about the Disambiguation operator (@), please check the following article:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators#disambiguation-oper...

 

In additon, please make sure the "DateAddedToFile" column in your AddDetail or 'Test List' data source has same data type.

 

Best regards,

Community Support Team _ Kris Dai
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

Highlighted
Resolver II
Resolver II

The error seems to imply the datatype is incompatible, are you passing a text value through to SharePoint? If so you could use DateTimeValue(DateAddedToFile) which will convert the text to DateTime. If like someelse has suggested you are using the DatePicker control you need to use DateAddedToFile.SelectedDate

Highlighted


@Anonymous wrote:

Hello,

 

Is your DateAddedToFile a date picker control?  If so,  it should be referenced with DateAddedToFile.SelectedDate.


 

hello, It is not a date picker, it is just Today's Date that will auto fill in for the user

Highlighted
Anonymous
Not applicable

Great. How did the Disambiguation operator work out for you?

Highlighted


@Anonymous wrote:

Great. How did the Disambiguation operator work out for you?


Just tried it out, still getting the same error

Highlighted


@AndrewCarter wrote:

The error seems to imply the datatype is incompatible, are you passing a text value through to SharePoint? If so you could use DateTimeValue(DateAddedToFile) which will convert the text to DateTime. If like someelse has suggested you are using the DatePicker control you need to use DateAddedToFile.SelectedDate


I think this is the issue, but I cannot seem to figure it out. Where should I put the "DateTimeValue(DateAddedToFile)" within my program. I've tried, but it is not taking it as proper syntax.

Highlighted

Ok, on a previous screen my date text box did not have the DateValue in front of the input. I have corrected that, but am still getting the same error. (Picture below of updated textbox input)

 

date value.PNG


Highlighted
Anonymous
Not applicable

Hello,

 

I set up an input box like yours, formatted the same way. Here is the Patch command which worked for me:

 

Patch(

     '[Exodus].[MainMenu]',

     First(Filter('[Exodus].[MainMenu]', ButtonText="Environment")),

     {CreateDate: DateValue(EndTime.Text) })

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (9,477)