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
Solved! Go to Solution.
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:
In additon, please make sure the "DateAddedToFile" column in your AddDetail or 'Test List' data source has same data type.
Best regards,
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,
Hello,
Is your DateAddedToFile a date picker control? If so, it should be referenced with DateAddedToFile.SelectedDate.
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:
In additon, please make sure the "DateAddedToFile" column in your AddDetail or 'Test List' data source has same data type.
Best regards,
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
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)
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) })
User | Count |
---|---|
183 | |
124 | |
88 | |
45 | |
43 |
User | Count |
---|---|
254 | |
160 | |
128 | |
81 | |
73 |