You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add OOTB "End Date" or any date field named starting with a number (for example, "1Date") to a content type
Add the content type to a document library
Create a document out of the content type
Attach the custom form to the list content type
Add a date value to the new document from Details Pane
Open custom form
Issue: errors show up in console, the form shows and disappears.
Investigation
The reason could be the line to get the date value from the list item.
The key of the date field value in list item is not the same as field internal name. For example, for OOTB date field "End Date", internal name is "EndDate", but in list item, its saved as "OData__EndDate". Same to other fields which internal name starts with underscore "". SharePoint will prefix it with "OData_" to make DynamicForm unable to get the value.
The text was updated successfully, but these errors were encountered:
When a date column is created with an underscore or '_' at the begining, the form is not rendered correctly. For instance, if a column with name '_AccomplishedDate', '1AccomplishedDate' is created, and the list form is not rendered, instead it errors out.
Solution
On investigating the issue, I have created columns as below
Column Name
Type
Internal Name (Retrieved from Item)
1EFDate
DateTime
OData__x0031_EFDate
2EFDate
DateTime
OData__x0032_EFDate
_EFDate3
DateTime
OData__EFDate3
12312EDate
DateTime
OData__x0031_2312EDate
%Test
Text
OData__x0025_Test
1Test
DateTime
OData__x0031_Test
Since the FieldInternal names are not matching with the Internal names of the columns, this issue is spotted.
By checking the FieldInternal name as below, and validating, the issue is resolved.
if (fieldName.startsWith('_x') || fieldName.startsWith('_')) {
fieldName = `OData_${fieldName}`;
}
Category
[ ] Enhancement
[X] Bug
[ ] Question
Version: [3.15.0]
Expected / Desired Behavior
The form should be rendered successfully.
Observed Behavior
The form dispears and errors show in the console.
Steps to Reproduce
Investigation
The reason could be the line to get the date value from the list item.
The key of the date field value in list item is not the same as field internal name. For example, for OOTB date field "End Date", internal name is "EndDate", but in list item, its saved as "OData__EndDate". Same to other fields which internal name starts with underscore "". SharePoint will prefix it with "OData_" to make DynamicForm unable to get the value.
The text was updated successfully, but these errors were encountered: