Page 1 of 1

Adding System Settings to System Configuration

PostPosted: Sun Nov 04, 2018 3:52 pm
by SBarnes
Hi Guys

What is the SQL statement to add a setting to the System tab in the System Configuration and what would be the code using Jiwa's objects to read this back out within an application that is not a plugin and then also in a plugin?

Re: Adding System Settings to System Configuration  Topic is solved

PostPosted: Tue Nov 27, 2018 11:14 am
by Mike.Sheen
System settings can be created without a plugin using a direct INSERT into the table SY_SysValues. The last 4 columns of that table (ScriptFormatCell, ScriptButtonClicked, ScriptReadData and GridHandlerCode) are not used and are there for legacy purposes - old version 6 settings used to require those.

The REST API plugin has an example of reading a system setting - this will work in a plugin or an external application using our Manager class regardless if the setting was attached to a plugin or not :

Code: Select all
string url = Manager.Database.ReadSysData("REST API", "WebhooksHostURL", "").ToString();


Of course, you can also just read the SY_SysValues directly as an alternative.