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

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 Team
Community Support Team

Re: Upload Collection To sharepoint List Date/Time Error

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

Community Support Team
Community Support Team

Re: Upload Collection To sharepoint List Date/Time Error

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
emh
Level 8

Re: Upload Collection To sharepoint List Date/Time Error

Hello,

 

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

Community Support Team
Community Support Team

Re: Upload Collection To sharepoint List Date/Time Error

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
AndrewCarter
Level 8

Re: Upload Collection To sharepoint List Date/Time Error

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

jbaggett
Level: Powered On

Re: Upload Collection To sharepoint List Date/Time Error


@emh 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

emh
Level 8

Re: Upload Collection To sharepoint List Date/Time Error

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

jbaggett
Level: Powered On

Re: Upload Collection To sharepoint List Date/Time Error


@emh wrote:

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


Just tried it out, still getting the same error

jbaggett
Level: Powered On

Re: Upload Collection To sharepoint List Date/Time Error


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

jbaggett
Level: Powered On

Re: Upload Collection To sharepoint List Date/Time Error

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


emh
Level 8

Re: Upload Collection To sharepoint List Date/Time Error

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
thirdimage

Power Automate 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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 173 members 4,966 guests
Please welcome our newest community members: