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
Copy file name to clipboardExpand all lines: docs/SHAREPOINT_SETUP.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,9 @@ In order for a submission to get written to a Sharepoint list, the following is
11
11
- the values of formId, siteId, listId, and status (live or draft) must exist in the forms-sharepoint-listener config
12
12
13
13
- the Sharepoint list (denoted by siteId and listId) must contain ALL columns from the source form
14
-
- the Sharepoint list column names must match the short description from each question
14
+
- the Sharepoint list column names must match the short description from each question**(and the naming is case-sensitive)**
15
15
16
-
- the short descriptions from the form must all be unique
16
+
- the short descriptions from the form must all be unique (within the first 32 characters if spaces are removed)
17
17
18
18
- the Sharepoint list column datatypes must match according to the ‘Datatype mappings’ table below
19
19
@@ -39,6 +39,8 @@ If your form uses repeater pages, you need to setup the appropriate Sharepoint l
39
39
40
40
- Field area 3
41
41
42
+
**Note** - there is a limit of 32 characters on the ‘internal’ column name (the name used to lookup the column) so any repeater short descriptions should be no more than 32 characters when the repeat number is added and spaces are removed e.g. ‘My repeater field 25’ (if my max repeaters is 25) which strips to ‘Myrepeaterfield25’ should be no longer than 32 characters.
43
+
42
44
## Configuration structure
43
45
44
46
The service configuration (set by the development team or CDP) consists of zero or more rows of the following structure:
@@ -65,6 +67,12 @@ A valid config value which allow two different forms to write to two different S
Although you can rename a Sharepoint column name (for example if you change a question’s short description), the original ‘internal’ Sharepoint column name remains. All you are doing by renaming the Sharepoint column is changing the display name.
73
+
74
+
So if you need to change a Sharepoint column name to match a question’s short description, you will have to add a new column with the correct name, copy over any data from the original column, then delete the original column.
75
+
68
76
## Determining the siteId and listId of a Sharepoint list
69
77
70
78
Normally a Sharepoint list is referred to by a url containing its site name and list name e.g. https://defradev.sharepoint.com/teams/TEAM164UAT/Lists/TestList1/AllItems.aspx
`Repeater columns plus number index cannot be longer than 32 characters (with spaces stripped) - shortDesc: ${baseComponentKey}${maxRepeaterItems} formId: ${formId}`
'Repeater columns plus number index cannot be longer than 32 characters (with spaces stripped) - shortDesc: RepeaterNameThatIsTooLongHerexx15 formId: my-form-id'
112
+
)
113
+
})
101
114
})
102
115
103
116
describe('escapeFieldName',()=>{
@@ -143,3 +156,7 @@ line 3`,
143
156
})
144
157
})
145
158
})
159
+
160
+
/**
161
+
* @import { PageQuestion, TextFieldComponent } from '@defra/forms-model'
0 commit comments