SqlData Integration

Modified on Mon, 5 Oct at 1:53 PM

We can fetch and insert data with our SqlData integration. This feature lets us fetch information based on a document property value and inserts into the document using DocumentData.

Module is located here:

...\ModuleLibrary\SqlData\01_nocontext_SqlData

Required plugin is located here:

...\SD.Installers\AlloyPlugins\RawPlugins\SkabelonDesign.SqlData

CMD

XML
<Cmd case="SkabelonDesign.SqlData:FetchAndInsertData"/>

This lets us interact with a SQL database

Parameters

prefix

Define the prefix to use when inserting into DocumentData.

query

Define the SQL Query to get data from, e.g. query="SELECT * FROM x".

This parameter can contain keys looked up in pending data of DocumentData by using SQL syntax. Read in this link for SQL query syntax.

connection

Insert .NET Connection specifications here.

Here is an example:
connection="Data Source=test.database.windows.net;Initial Catalog=Test;User ID=x;Password=x"

promptUi

This parameter is optional. Set this to true to prompt the user with a selection of columns to choose from. This should be used in combination with the following variable:

columnName

Define the column name of the columns that should be included in the prompted UI from the previous variable.

Example of usage

Example: Not using the promptUi parameter. User and Password has been redacted.

XML
<Cmd
 prefix="dla"
 case="SkabelonDesign.AWSData:FetchAndInsertData"
 query="SELECT * FROM [dbo].[SkabelonDesign_Sagsoplysninger] WHERE [SagsId] = '{SagsID}'"
 connection="Data Source=AWSpsql01\Advosys;Initial Catalog=Advosys;Integrated Security=SSPI;User ID=XXXXX;Password=XXXXX"
 />

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article