<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://greggsmith.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bartosz</id>
		<title>SDU - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://greggsmith.net/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bartosz"/>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Special:Contributions/Bartosz"/>
		<updated>2026-07-29T16:02:40Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.1</generator>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Spel_Reference_Guide&amp;diff=4320</id>
		<title>Spel Reference Guide</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Spel_Reference_Guide&amp;diff=4320"/>
				<updated>2011-04-12T13:10:44Z</updated>
		
		<summary type="html">&lt;p&gt;Bartosz: /* Reference Sections */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:Customizations]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
Note: please treat SPELL as SPEL &lt;br /&gt;
== Overview ==&lt;br /&gt;
Spell is CA proprietary code used to script Service Desk core operations. Spell code can be found in .spl and .maj files located in [[$NX_ROOT]]\bopcfg\majic and [[$NX_ROOT]]\site\mods\majic directories. Other examples can be found in the [[$NX_ROOT]]\samples directory.&lt;br /&gt;
&lt;br /&gt;
Note: .spl files with a ''pcd'' preceding the .spl are encrypted files, such as chgpcd.spl or itilpcd.spl.&lt;br /&gt;
&lt;br /&gt;
Spell is usually used to write methods for object or attribute triggers.  Examples may be attribute validation, notification, post processing, etc.&lt;br /&gt;
&lt;br /&gt;
Spell is interpreted and executed by the Method Engine (spel_srvr), it can also be executed from the command line with bop_cmd command that interprets the fragment (.frg) files and executes the code.&lt;br /&gt;
&lt;br /&gt;
The language resembles C++.  Unlike C or C++, Spell does not support pointers or structures.&lt;br /&gt;
&lt;br /&gt;
== Reference Sections ==&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=3|'''&amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;Functions&amp;lt;/font&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;34%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[format]]&lt;br /&gt;
*[[getenv]]&lt;br /&gt;
*[[gsub]]&lt;br /&gt;
*[[is_empty]]&lt;br /&gt;
*[[is_null]]&lt;br /&gt;
| width=&amp;quot;33%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[misc:find_mang]]&lt;br /&gt;
*[[now]]&lt;br /&gt;
*[[send_wait]]&lt;br /&gt;
*[[sindex]]&lt;br /&gt;
| width=&amp;quot;33%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[strlen]]&lt;br /&gt;
*[[substr]]&lt;br /&gt;
*[[workshift_abs2work]]&lt;br /&gt;
*[[workshift_work2abs]]&lt;br /&gt;
*[[exec]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=3|'''&amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;Statements&amp;lt;/font&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;34%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[if]]&lt;br /&gt;
| width=&amp;quot;33%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[for]]&lt;br /&gt;
| width=&amp;quot;33%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[while]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! colspan=3|'''&amp;lt;font size=&amp;quot;3&amp;quot;&amp;gt;Other&amp;lt;/font&amp;gt;'''&lt;br /&gt;
|-&lt;br /&gt;
| width=&amp;quot;34%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[Data Type Conversion]]&lt;br /&gt;
*[[Operators]]&lt;br /&gt;
| width=&amp;quot;33%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[Spel FAQ]]&lt;br /&gt;
*[[Triggering Reaction]]&lt;br /&gt;
| width=&amp;quot;33%&amp;quot; align=&amp;quot;left&amp;quot; style=&amp;quot;vertical-align:top;&amp;quot; |&lt;br /&gt;
*[[Troubleshooting Spell Code|Troubleshooting]]&lt;br /&gt;
*[[Variables and Types]]&lt;br /&gt;
*[[Methods handling]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[WSSIWYG]] by Nero Le Velu&lt;/div&gt;</summary>
		<author><name>Bartosz</name></author>	</entry>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Pdm_load&amp;diff=4207</id>
		<title>Pdm load</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Pdm_load&amp;diff=4207"/>
				<updated>2010-11-26T11:02:14Z</updated>
		
		<summary type="html">&lt;p&gt;Bartosz: Undo revision 4152 by Agegeleruvy (Talk) - spam?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Use pdm_load to insert, update or remove data into the database and bypass the GUIs.&amp;lt;br&amp;gt;&lt;br /&gt;
pdm_load uses the SeviceDesk virtual DB Schema layer to access the physical database.&amp;lt;br&amp;gt;&lt;br /&gt;
Contrary to direct Database access by ODBC for example, each data change is directly propagated to all ServiceDesk processes.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
pdm_load -f [filename] [-a] [-c] [-e] [-h] [-i] [-m] [-v] [-r] [-u] [-x]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| -a&lt;br /&gt;
| update all matching data&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -c&lt;br /&gt;
| check only, no change to data&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -e&lt;br /&gt;
| treat escapes literally&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -h&lt;br /&gt;
| help&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -i&lt;br /&gt;
| insert only&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -m&lt;br /&gt;
| notify domsrvr of mass update&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -v&lt;br /&gt;
| verbose&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -r&lt;br /&gt;
| remove&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -u&lt;br /&gt;
| update only&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -x&lt;br /&gt;
| use locale sensitive numeric input formats&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
* A standard load. This load assumes that the file contains ids or uuids for all entries.&lt;br /&gt;
 pdm_load -f extract.txt -v&lt;br /&gt;
&lt;br /&gt;
* Using the -i to load data will force the creation of new ids and uuids. The file being loaded should be void of any id and uuid data.&lt;br /&gt;
 pdm_load -f cnt_data.csv -i -v&lt;br /&gt;
&lt;br /&gt;
* Removing some info (not shared by another application) from a file. Use the -r&lt;br /&gt;
 pdm_load -f InfoToRemove.dat -r -v 2&amp;gt;load.err&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
When doing a pdm_load of a ca_xxxxxx table that contains references to another ca_xxxxxx table, the reference must be valid or the entry will not be loaded and an error generated. For example, if loading the ca_contact table, if the ca_location_uuid field contains references to the ca_location table, then the record that is being reference MUST exist in the ca_location table or that particular entry will not be loaded. A common scenario is to perform an extract of the production contact data and then load it into development. However if the contact tables has references to the ca_location table you will first need to do a load of the ca_location table to ensure that all the references from the ca_contact load are valid. And if the ca_location table has references to the ca_site table, you will need to do a load of ca_site to ensure all the references from the ca_location load are valid.&lt;/div&gt;</summary>
		<author><name>Bartosz</name></author>	</entry>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Pdm_extract&amp;diff=4206</id>
		<title>Pdm extract</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Pdm_extract&amp;diff=4206"/>
				<updated>2010-11-26T10:56:25Z</updated>
		
		<summary type="html">&lt;p&gt;Bartosz: Undo revision 4156 by Agegeleruvy (Talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Use this command to dump data from the database to the screen or file (typically txt, dat, or csv).&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
pdm_extract [-h] [-f] [-c] [-e] [-r] [-v] [-s] [-u] [-d] [-x] [-X] [ALL | database table names]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
! Command&lt;br /&gt;
! Description&lt;br /&gt;
! Remarks&lt;br /&gt;
|-&lt;br /&gt;
| -h&lt;br /&gt;
| Help&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -f&lt;br /&gt;
| format string&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -c&lt;br /&gt;
| csv output&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -e&lt;br /&gt;
| csv output with double double quotes&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -r&lt;br /&gt;
| informal report output&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -v&lt;br /&gt;
| verbose&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -s&lt;br /&gt;
| saved script&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -u&lt;br /&gt;
| no headers&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -d&lt;br /&gt;
| use dataent.fmt&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -x&lt;br /&gt;
| locale sensitive numeric formats&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| -X&lt;br /&gt;
| extract all tables except table list &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
* Extract all Service Desk tables&lt;br /&gt;
 pdm_extract All &amp;gt; All.txt&lt;br /&gt;
&lt;br /&gt;
* Extract a filtered list&lt;br /&gt;
 pdm_extract -f &amp;quot;SELECT * FROM Call_Req WHERE type = 'I'&amp;quot; &amp;gt; Call_Req.dat&lt;br /&gt;
&lt;br /&gt;
* Extract a full table&lt;br /&gt;
 pdm_extract Priority &amp;gt; pri.txt&lt;br /&gt;
&lt;br /&gt;
* Extract multiple tables&lt;br /&gt;
 pdm_extract Call_Request Activity_Log &amp;gt; call.dat&lt;br /&gt;
&lt;br /&gt;
* Extract two or more joined tables (you cannot use INNER JOIN or similar clausules, only this cross join is possible)&lt;br /&gt;
 pdm_extract -f &amp;quot;SELECT  ca_contact.id, c_acctyp_id FROM ca_contact, usp_contact WHERE ca_contact.id = usp_contact.id AND c_acctyp_id is null&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;div align='center'&amp;gt;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;To make corrections or additions to this article, select the ''edit'' tab above.&amp;lt;br&amp;gt;&lt;br /&gt;
To discuss or ask questions about this article, select the ''discussion'' tab above.&amp;lt;/font&amp;gt;&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bartosz</name></author>	</entry>

	</feed>