Skip to main content

Pass Ouvvi User Settings into Data Sync Projects

This guide explains how to utilize Ouvvi User Settings within your Data Sync projects.

Properties Passed from Ouvvi

Ouvvi automatically passes certain settings into Data Sync projects that can be used within Project Automation. These range from the project name, trigger time, last successful run and the context to name a few.

To view the settings automatically passed from Ouvvi into Data Sync you need to start by opening a Data Sync project from Ouvvi and then open the File menu and select Properties. Then click onto the ellipsis in the Properties field to open the properties collection editor and you will be able to see all of the settings being automatically passed from Ouvvi into Data Sync.

Auto Ouvvi Settings

Create a Property

To pass User Settings from Ouvvi into your Data Sync projects, you need to create a new Property in Data Sync with the same name as one in Ouvvi.

To create a new property, go to File > Properties> Properties, open the collection editor and click Add to create a new property. Enter in the property name and a value and click OK add it to the properties collection.

Add to Properties Collection

Use the Property with Project Automation

To use this new property with your project you need to write code within the Project Automation Start() method to apply the change to your data source configuration, such as modifying the Where clause on the SQL Provider.

To get a value from the Properties Collection, simply access it by the indexer. For example to get the LastID property added earlier you can use: Properties["LastID"]

    public override void Start()
{
DataSourceA.CommandWhere = string.Format("ProductID >{0}", Properties["LastID"]);
Trace.WriteLine(DataSourceA.CommandWhere);
}

Project Automation

Now when the User Setting value is updated in Ouvvi, it is also updated in the Properties of the project at runtime.