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
<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.
<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"
/>
Comments
0 comments
Article is closed for comments.