cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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

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
Anonymous
Not applicable

Hello,

 

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

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

Anonymous
Not applicable

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


@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

Anonymous
Not applicable

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


@Anonymous wrote:

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


Just tried it out, still getting the same error


@Anonymous 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.

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


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
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (56,803)