<?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=Yochai</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=Yochai"/>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Special:Contributions/Yochai"/>
		<updated>2026-04-17T15:41:09Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.1</generator>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Troubleshooting_Spell_Code&amp;diff=4013</id>
		<title>Troubleshooting Spell Code</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Troubleshooting_Spell_Code&amp;diff=4013"/>
				<updated>2010-02-14T15:36:00Z</updated>
		
		<summary type="html">&lt;p&gt;Yochai: loose time -&amp;gt; lose time&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
[[Category:r6]]&lt;br /&gt;
[[Category:r11]]&lt;br /&gt;
[[Category:Spel Code]]&lt;br /&gt;
[[Category:Troubleshooting]]&lt;br /&gt;
{{Global Header}}&lt;br /&gt;
{{Global Announcement}}&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Troubleshooting spell code always was such as a hell for me, until I meet bop_cmd.&lt;br /&gt;
&lt;br /&gt;
Every once in a while we need to test some kind of structure, logic or even code and we always forget a semicolon, a curly bracket and BANG Service Desk crashes and we need to debug, restart, copy code and of course, lose time.&lt;br /&gt;
&lt;br /&gt;
With bop_cmd we can run spell code with little or no impact in Service Desk.&lt;br /&gt;
&lt;br /&gt;
Of course, to run a spell file, we need the pdm_daemon_manager service to be running.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
bop_cmd -s spell file.spl  &amp;quot;spell_function in file(0, parameter1, parameter2, parameter3)&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To simulate the triggering event such as Service Desk does, always send to the function a first parameter 0 (which I do not know what it is, but trust me, you need to do this), the name of the property described in the mod file, and two values, one representing the value before the trigger was fired, and one after.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
* In this example, we start a spell function named ''chips'' in a spell file named ''potato.spl'', simulating the priority change from 0 to 1.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
bop_cmd -s potato.spl &amp;quot;chips(0, 'priority', 0, 1 )&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Yochai</name></author>	</entry>

	<entry>
		<id>http://greggsmith.net/wiki/index.php?title=Format&amp;diff=4012</id>
		<title>Format</title>
		<link rel="alternate" type="text/html" href="http://greggsmith.net/wiki/index.php?title=Format&amp;diff=4012"/>
				<updated>2010-02-11T13:29:44Z</updated>
		
		<summary type="html">&lt;p&gt;Yochai: &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;
== Syntax ==&lt;br /&gt;
'''string format(string expression, ... variables);'''&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; style=&amp;quot;width:200px;&amp;quot;&lt;br /&gt;
|+ Escape Characters&lt;br /&gt;
|-&lt;br /&gt;
! Character&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| %%&lt;br /&gt;
| percent sign&lt;br /&gt;
|-&lt;br /&gt;
|%f&lt;br /&gt;
|float&lt;br /&gt;
|-&lt;br /&gt;
| %d&lt;br /&gt;
| int&lt;br /&gt;
|-&lt;br /&gt;
| %s&lt;br /&gt;
| string&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;format(&amp;quot;Change number is %s&amp;quot;, chg_ref_num);&lt;br /&gt;
format(&amp;quot;Change number is %s and description is %s&amp;quot;, chg_ref_num, description);&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Formatting a UUID as a string ==&lt;br /&gt;
r11.x introduced a new data type known as the UUID which replaced the old integer ID in many areas, most notably with regards to Contacts. This change complicated the printing of the id which previously required only a %d. But since the UUID is not an integer, the %s is now the best solution. &lt;br /&gt;
&lt;br /&gt;
'''Examples'''&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;string MyResult;&lt;br /&gt;
MyResult = format( &amp;quot;The uuid of %s is : %s), assignee.userid, (string)assignee.id);&lt;br /&gt;
&lt;br /&gt;
MyResult = format(&amp;quot;&amp;amp;{U'%s'=cnt.id-&amp;gt;combo_name}&amp;quot;, (string)assignee.id);&lt;br /&gt;
&lt;br /&gt;
MyResult = format(&amp;quot;&amp;amp;{0x%s=cnt.id-&amp;gt;combo_name}&amp;quot;, (string)assignee.id);&amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Yochai</name></author>	</entry>

	</feed>