Reference

Table [Dynamic Table]


Description

No description available

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT get_list_items
INSERT create_list_item
UPDATE update_list_item
UPSERT
DELETE delete_list_item
LOOKUP get_list_item

Examples

SSIS

Use SharePoint Online Connector in API Source component to read data or in API Destination component to read/write data:

Read from [Dynamic Table] table using API Source

API Source - SharePoint Online
SharePoint Connector can be used to read, write data in SharePoint Online List / Document Library, perform file operations such as upload, download, create, move, delete, rename in a few clicks!
SharePoint Online
[Dynamic Table]
Required Parameters
ListId Fill-in the parameter...
Optional Parameters
SiteId (Re-Select ListId after you change this)
Filter
SSIS API Source - Read from table or endpoint

Read/write to [Dynamic Table] table using API Destination

API Destination - SharePoint Online
SharePoint Connector can be used to read, write data in SharePoint Online List / Document Library, perform file operations such as upload, download, create, move, delete, rename in a few clicks!
SharePoint Online
[Dynamic Table]
Select
Required Parameters
ListId Fill-in the parameter...
Optional Parameters
SiteId (Re-Select ListId after you change this)
Filter
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Select data from a named list

SELECT * FROM MyList 
--WHERE Id = 1234

Insert data into a named list

INSERT INTO MyList(Name, Surname)
VALUES ('John', 'Doe') WITH (Output=1)

Insert multiple Lookup or Person/Group IDs into a named list

--new version --				
INSERT INTO MyList(Title, ManyPersonsLookupId, ManyPersonsLookupIdOdataType)
VALUES ('John Doe', '[11,22,33]', 'Collection(Edm.Int32)')
WITH (Output=1)

--old version --				
INSERT INTO MyList(Title, ManyPersonsLookupId, "fields.ManyPersonsLookupId@odata\u002Etype")
VALUES ('John Doe', '[11,22,33]', 'Collection(Edm.Int32)')
WITH (Output=1)
--Considering "ManyPersons" is the name of the field in SharePoint List

Insert multiple Choice Values into a named list

--new version --				
INSERT INTO MyList(Title, MultiChoiceField, MultiChoiceFieldODataType)
VALUES ('John Doe', '["Choice1","Choice5"]', 'Collection(Edm.String)')
WITH (Output=1)

--old version --				

INSERT INTO MyList(Title, MultiChoiceField, "fields.MultiChoiceField@odata\u002Etype")
VALUES ('John Doe', '["Choice1","Choice5"]', 'Collection(Edm.String)')
WITH (Output=1)

--Considering "MultiChoiceField" is the name of the field in SharePoint List

Update data in a named list

UPDATE MyList
SET Name = 'Elizabeth', Surname = 'Johnson'
WHERE Id = '123'

Update Multi Select Lookup or Person/Group IDs field

UPDATE MyList
SET Title = 'Elizabeth Johnson',
	--Method#1 (Pass type info in the same value)
    ManyPersonsLookupId = '[11,22,33]', "fields.ManyPersonsLookupId@odata\u002Etype" = 'Collection(Edm.Int32)'
    --Method#2 (Pass type info via ODataField)
	--OR--
	--ManyPersonsLookupId = '[11,22,33]',
    --ManyPersonsLookupIdODataType" = 'Collection(Edm.Int32)
	
WHERE Id = '123'

Update / Insert Sharepoint List Data (Mixed Data Types - e.g. Multi Choice, Lookup, Person, DateTime, Number)

UPDATE  "Travel Requests" --list name
SET   
	 Title='MyTitle @ <<FUN_NOW>>'  
	 --Method#1 Pass Value and Type in 2 fields
	, CustomText = 'This is text'
	, CustomTextLarge = 'This is really long text ....'	                     
	, CustomNumber = 10000.12345
	, CustomDateTime ='2012-12-31T23:59:59.123Z' --End with Z to treat as UTC time (avoid local-UTC conversion)
	, CustomChoice = 'BB'
	
	--Choice Multi-Select
	, CustomChoiceMulti = '["AA", "BB"]'
	, CustomChoiceMultiODataType='Collection(Edm.String)' --for multi select must supply OData Type 
	--OR-- append like below in one field
	--, CustomChoiceMulti = '["AA", "BB"], "CustomChoiceMulti@odata.type" : "Collection(Edm.String)"'
	
	--Lookup
	--field with Lookup type must be set to [<field-name>LookupId] field (suffix with LookupId)
	, CustomLookupSingleLookupId = 1 
	
	--Lookup Multi-Select
	, CustomLookupMultiLookupId = '[1,3]' --for multi select must supply OData Type 
	, CustomLookupMultiLookupIdODataType='Collection(Edm.Int32)'
	--OR-- append like below in one field
	--, CustomLookupMultiLookupId = '[1,3], "CustomLookupMultiLookupId@odata.type" : "Collection(Edm.String)"'
	
	--Person 
	,CustomPersonLookupId = 11  
	
	--Person Multi-Select
	, CustomPersonMultiLookupId = '[11, 22]' 
	, CustomPersonMultiLookupIdODataType='Collection(Edm.Int32)'
	--OR-- append like below in one field
	--, CustomPersonMultiLookupIdODataType = '[11,22], "CustomPersonMultiLookupIdODataType@odata.type" : "Collection(Edm.Int32)"'
	
Where Id=1 --List Item Id

--- Insert Example ----

INSERT INTO "Travel Requests" --list name
(
	 Title
	, CustomText 
	, CustomTextLarge 
	, CustomNumber 
	, CustomDateTime 
	, CustomChoice 
	
	, CustomChoiceMulti 
	, CustomChoiceMultiODataType

	, CustomLookupSingleLookupId 
	
	--Lookup Multi-Select
	, CustomLookupMultiLookupId 
	, CustomLookupMultiLookupIdODataType
	
	--Person 
	,CustomPersonLookupId 
	
	, CustomPersonMultiLookupId 
	, CustomPersonMultiLookupIdODataType
)
VALUES(
	  'MyTitle @ <<FUN_NOW>>'  
	, 'This is text'
	, 'This is really long text .. '	                     
	, 10000.12345
	, '2012-12-31T23:59:59.123Z' --End with Z to treat as UTC time (avoid local-UTC conversion)
	, 'BB'

	--Choice Multi-Select
	, '["AA", "BB"]'
	, 'Collection(Edm.String)' --for multi select must supply OData Type 
	
	--Lookup
	,  1 
	
	--Lookup Multi-Select
	, '[1,3]' --for multi select must supply OData Type 
	, 'Collection(Edm.Int32)'
	
	--Person 
	,11  
	
	--Person Multi-Select
	, '[11, 22]' 
	, 'Collection(Edm.Int32)'
)

Delete item from a named list

DELETE FROM MyList WHERE Id=888
--OR--        
DELETE FROM MyList WITH (ListItemId='123')

--ListItemId can be retrieved by selecting from named list table, e.g. 'MyList'.

Get full image path from Image type field

By default Image field in your List will show JSON document which contains many pieces of your Image field. To get full path of your Image file you can use JSON_VALUE function and extract multiple fields and concat together to get full path like below.

SELECT *,(JSON_VALUE(MyImageField,'$.serverUrl') || JSON_VALUE(MyImageField,'$.serverRelativeUrl')) as DevicePhotoUrl,
    FROM "My SharePoint List Name"

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Select data from a named list

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM MyList 
--WHERE Id = 1234';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Insert data into a named list

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO MyList(Name, Surname)
VALUES (''John'', ''Doe'') WITH (Output=1)';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Insert multiple Lookup or Person/Group IDs into a named list

DECLARE @MyQuery NVARCHAR(MAX) = '--new version --				
INSERT INTO MyList(Title, ManyPersonsLookupId, ManyPersonsLookupIdOdataType)
VALUES (''John Doe'', ''[11,22,33]'', ''Collection(Edm.Int32)'')
WITH (Output=1)

--old version --				
INSERT INTO MyList(Title, ManyPersonsLookupId, "fields.ManyPersonsLookupId@odata\u002Etype")
VALUES (''John Doe'', ''[11,22,33]'', ''Collection(Edm.Int32)'')
WITH (Output=1)
--Considering "ManyPersons" is the name of the field in SharePoint List';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Insert multiple Choice Values into a named list

DECLARE @MyQuery NVARCHAR(MAX) = '--new version --				
INSERT INTO MyList(Title, MultiChoiceField, MultiChoiceFieldODataType)
VALUES (''John Doe'', ''["Choice1","Choice5"]'', ''Collection(Edm.String)'')
WITH (Output=1)

--old version --				

INSERT INTO MyList(Title, MultiChoiceField, "fields.MultiChoiceField@odata\u002Etype")
VALUES (''John Doe'', ''["Choice1","Choice5"]'', ''Collection(Edm.String)'')
WITH (Output=1)

--Considering "MultiChoiceField" is the name of the field in SharePoint List';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Update data in a named list

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE MyList
SET Name = ''Elizabeth'', Surname = ''Johnson''
WHERE Id = ''123''';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Update Multi Select Lookup or Person/Group IDs field

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE MyList
SET Title = ''Elizabeth Johnson'',
	--Method#1 (Pass type info in the same value)
    ManyPersonsLookupId = ''[11,22,33]'', "fields.ManyPersonsLookupId@odata\u002Etype" = ''Collection(Edm.Int32)''
    --Method#2 (Pass type info via ODataField)
	--OR--
	--ManyPersonsLookupId = ''[11,22,33]'',
    --ManyPersonsLookupIdODataType" = ''Collection(Edm.Int32)
	
WHERE Id = ''123''';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Update / Insert Sharepoint List Data (Mixed Data Types - e.g. Multi Choice, Lookup, Person, DateTime, Number)

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE  "Travel Requests" --list name
SET   
	 Title=''MyTitle @ <<FUN_NOW>>''  
	 --Method#1 Pass Value and Type in 2 fields
	, CustomText = ''This is text''
	, CustomTextLarge = ''This is really long text ....''	                     
	, CustomNumber = 10000.12345
	, CustomDateTime =''2012-12-31T23:59:59.123Z'' --End with Z to treat as UTC time (avoid local-UTC conversion)
	, CustomChoice = ''BB''
	
	--Choice Multi-Select
	, CustomChoiceMulti = ''["AA", "BB"]''
	, CustomChoiceMultiODataType=''Collection(Edm.String)'' --for multi select must supply OData Type 
	--OR-- append like below in one field
	--, CustomChoiceMulti = ''["AA", "BB"], "CustomChoiceMulti@odata.type" : "Collection(Edm.String)"''
	
	--Lookup
	--field with Lookup type must be set to [<field-name>LookupId] field (suffix with LookupId)
	, CustomLookupSingleLookupId = 1 
	
	--Lookup Multi-Select
	, CustomLookupMultiLookupId = ''[1,3]'' --for multi select must supply OData Type 
	, CustomLookupMultiLookupIdODataType=''Collection(Edm.Int32)''
	--OR-- append like below in one field
	--, CustomLookupMultiLookupId = ''[1,3], "CustomLookupMultiLookupId@odata.type" : "Collection(Edm.String)"''
	
	--Person 
	,CustomPersonLookupId = 11  
	
	--Person Multi-Select
	, CustomPersonMultiLookupId = ''[11, 22]'' 
	, CustomPersonMultiLookupIdODataType=''Collection(Edm.Int32)''
	--OR-- append like below in one field
	--, CustomPersonMultiLookupIdODataType = ''[11,22], "CustomPersonMultiLookupIdODataType@odata.type" : "Collection(Edm.Int32)"''
	
Where Id=1 --List Item Id

--- Insert Example ----

INSERT INTO "Travel Requests" --list name
(
	 Title
	, CustomText 
	, CustomTextLarge 
	, CustomNumber 
	, CustomDateTime 
	, CustomChoice 
	
	, CustomChoiceMulti 
	, CustomChoiceMultiODataType

	, CustomLookupSingleLookupId 
	
	--Lookup Multi-Select
	, CustomLookupMultiLookupId 
	, CustomLookupMultiLookupIdODataType
	
	--Person 
	,CustomPersonLookupId 
	
	, CustomPersonMultiLookupId 
	, CustomPersonMultiLookupIdODataType
)
VALUES(
	  ''MyTitle @ <<FUN_NOW>>''  
	, ''This is text''
	, ''This is really long text .. ''	                     
	, 10000.12345
	, ''2012-12-31T23:59:59.123Z'' --End with Z to treat as UTC time (avoid local-UTC conversion)
	, ''BB''

	--Choice Multi-Select
	, ''["AA", "BB"]''
	, ''Collection(Edm.String)'' --for multi select must supply OData Type 
	
	--Lookup
	,  1 
	
	--Lookup Multi-Select
	, ''[1,3]'' --for multi select must supply OData Type 
	, ''Collection(Edm.Int32)''
	
	--Person 
	,11  
	
	--Person Multi-Select
	, ''[11, 22]'' 
	, ''Collection(Edm.Int32)''
)';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Delete item from a named list

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM MyList WHERE Id=888
--OR--        
DELETE FROM MyList WITH (ListItemId=''123'')

--ListItemId can be retrieved by selecting from named list table, e.g. ''MyList''.';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];

Get full image path from Image type field

By default Image field in your List will show JSON document which contains many pieces of your Image field. To get full path of your Image file you can use JSON_VALUE function and extract multiple fields and concat together to get full path like below.

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT *,(JSON_VALUE(MyImageField,''$.serverUrl'') || JSON_VALUE(MyImageField,''$.serverRelativeUrl'')) as DevicePhotoUrl,
    FROM "My SharePoint List Name"';

EXEC (@MyQuery) AT [LS_TO_SHAREPOINT_ONLINE_IN_GATEWAY];