<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notes On Siebel &#187; Configuration</title>
	<atom:link href="http://blog.notesonsiebel.com/category/siebel/configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.notesonsiebel.com</link>
	<description>Technical advice, help and instruction with Siebel Systems</description>
	<lastBuildDate>Wed, 13 Aug 2008 23:24:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Browser Script &#8220;on the fly&#8221;</title>
		<link>http://blog.notesonsiebel.com/2008/05/20/browser-script-on-the-fly/</link>
		<comments>http://blog.notesonsiebel.com/2008/05/20/browser-script-on-the-fly/#comments</comments>
		<pubDate>Tue, 20 May 2008 06:27:21 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/?p=59</guid>
		<description><![CDATA[Top tip today from Neel over at Siebel Unleashed: using the IE address bar to enter browser script.
I&#8217;ve never thought of this, and the key point is worth repeating: script entered into the address bar after a javascript tag is executed by the browser, in exactly the same way as browser script. This means that [...]]]></description>
			<content:encoded><![CDATA[<p>Top tip today from Neel over at Siebel Unleashed: <a title="Address Bar and Browser Script" href="http://siebelunleashed.com/internet-explorer-address-bar-and-siebel-browser-script/">using the IE address bar to enter browser script</a>.</p>
<p>I&#8217;ve never thought of this, and the key point is worth repeating: script entered into the address bar after a javascript tag is executed by the browser, in exactly the same way as browser script. This means that if you edit the address to be:</p>
<p><code>javascript:alert(theApplication().GetProfileAttr("Me.First Name"));</code></p>
<p>&#8230;then the browser will popup a message box with the value of the First Name attribute &#8211; exactly as you&#8217;d expect if this statement was in browser script. Much faster than navigating to <em>Administration &#8211; Personalization &gt; Test</em>, plus it retains current context.</p>
<p>Nice quick-and-dirty hack to check (or set) the value of browser objects. Good work, Neel!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2008/05/20/browser-script-on-the-fly/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Improving List of Values performance</title>
		<link>http://blog.notesonsiebel.com/2008/01/14/improving-list-of-values-performance/</link>
		<comments>http://blog.notesonsiebel.com/2008/01/14/improving-list-of-values-performance/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 00:14:22 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2008/01/14/improving-list-of-values-performance/</guid>
		<description><![CDATA[A quick titbit to get things rolling again after an extended silly season hiatus&#8230;
Whenever you need to access lists of values data in your configuration, note that of the business components defined on the S_LST_OF_VAL table, Picklist Generic is cached while List Of Values is not. The impact of this is that repeated queries to [...]]]></description>
			<content:encoded><![CDATA[<p>A quick titbit to get things rolling again after an extended silly season hiatus&#8230;</p>
<p>Whenever you need to access lists of values data in your configuration, note that of the business components defined on the S_LST_OF_VAL table, <b>Picklist Generic</b> is cached while <b>List Of Values</b> is not. The impact of this is that repeated queries to Picklist Generic will be served from the memory of the Object Manager, whereas queries to List Of Values will always hit the database. So for improved performance be sure to use Picklist Generic in your configuration, <i>not</i> List Of Values.</p>
<p>Caching behaviour is controlled by the business component property <b>Cache Data</b>: when this property is set to true then the database is only read once for a given query. You can see in Object Explorer that Picklist Generic has Cache Data set to true, while it&#8217;s false for List Of Values. This configuration allows the List Of Values BC to be used for managing LOVs, where it&#8217;s critical to always have the current database values, while Picklist Generic can be used where performance is more important.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2008/01/14/improving-list-of-values-performance/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>International Phone Formats</title>
		<link>http://blog.notesonsiebel.com/2007/11/13/phone-numbers-and-integration-objects/</link>
		<comments>http://blog.notesonsiebel.com/2007/11/13/phone-numbers-and-integration-objects/#comments</comments>
		<pubDate>Mon, 12 Nov 2007 22:45:40 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Integration]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/11/13/phone-numbers-and-integration-objects/</guid>
		<description><![CDATA[Since version 7, Siebel has had a somewhat confusing treatment of international phone numbers: numbers entered in the default format are stored simply with the country code, while numbers entered in any other format have a format string appended after a character return. All phone numbers are then displayed in either the default format or [...]]]></description>
			<content:encoded><![CDATA[<p>Since version 7, Siebel has had a somewhat confusing treatment of international phone numbers: numbers entered in the default format are stored simply with the country code, while numbers entered in any other format have a format string appended after a character return. All phone numbers are then displayed in either the default format <i>or</i> with their specific format string applied. You with me?</p>
<p>To illustrate with some examples&#8230;.</p>
<p>Suppose the following default formats are defined using the PHONE_FORMAT LOVs:</p>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="142"><b>Type</b></td>
<td width="117"><b>Display Value</b></td>
<td width="180"><b>Language-Independent   Code</b></td>
<td width="60"><b>Order</b></td>
</tr>
<tr>
<td width="142">PHONE_FORMAT</td>
<td width="117">(000) 000-0000</td>
<td width="180">(000) 000-0000</td>
<td width="60">1</td>
</tr>
<tr>
<td width="142">PHONE_FORMAT</td>
<td width="117">(00) 0000 0000</td>
<td width="180">(00) 0000 0000</td>
<td width="60">61</td>
</tr>
</table>
<p>The Display Value defines the format for the number, while the Order equates to a country code &#8211; so +1 for US, +61 for AUS.</p>
<p>Now, let&#8217;s assume we&#8217;re running the Siebel Client on an Australian workstation. How do different numbers get treated?</p>
<table border="1" cellpadding="0" cellspacing="0" width="451">
<tr>
<td width="136"><b>User Entered</b></td>
<td width="136"><b>Displayed As</b></td>
<td width="147"><b>Stored As</b></td>
</tr>
<tr>
<td width="136">0298766543</td>
<td width="136">(02) 9876 6543</td>
<td width="147">+610298766543</td>
</tr>
<tr>
<td width="136">(02) 9876 7654</td>
<td width="136">(02) 9876 7654</td>
<td width="147">+610298767654</td>
</tr>
<tr>
<td width="136">+610298768765</td>
<td width="136">(02) 9876 8765</td>
<td width="147">+610298768765</td>
</tr>
<tr>
<td width="136">+61 02 9876 5432</td>
<td width="136">02 9876 5432</td>
<td width="147">+610298765432<br />
00 0000 0000</td>
</tr>
<tr>
<td width="136">0412 3456 7890</td>
<td width="136">0412 3456 7890</td>
<td width="147">+61041234567890<br />
0000 0000 0000</td>
</tr>
<tr>
<td width="136">(0423) 3456-5678</td>
<td width="136">(0423) 3456-5678</td>
<td width="147">+61042334565678<br />
(0000) 0000-0000</td>
</tr>
<tr>
<td width="136">+14321239876</td>
<td width="136">+1(432) 123-9876</td>
<td width="147">4321239876</td>
</tr>
<tr>
<td width="136">+1 432 123 8765</td>
<td width="136">+1(432) 123-8765</td>
<td width="147">4321238765</td>
</tr>
</table>
<p>Essentially, non-American numbers get stored as a continuous string of numbers, including the country code and &#8216;+&#8217; international indicator. If the number is entered in a format that matches the default format, then that&#8217;s it. If the number is entered with a specific format, then this format is appended to the phone number. The separator between the actual phone number and the format string is a character return plus line feed [CHAR(13) || CHAR(10)].</p>
<p>This vanilla behaviour causes all sort of problems with integration &#8211; CTI, EAI, SQL etc &#8211; to the extent that most 7+ implementations I&#8217;ve worked on have ended up with some form of scripting to get around it. I&#8217;ll talk about some of the impacts and workarounds in more detail in future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/11/13/phone-numbers-and-integration-objects/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Order of Events</title>
		<link>http://blog.notesonsiebel.com/2007/07/19/order-of-events/</link>
		<comments>http://blog.notesonsiebel.com/2007/07/19/order-of-events/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 00:04:17 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Siebel]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/07/19/order-of-events/</guid>
		<description><![CDATA[A quick list, for reference:

Runtime Applet.PreInvokeMethod
Browser Applet_PreInvokeMethod
Server WebApplet_PreInvokeMethod
Runtime BusComp.PreInvokeMethod
Server BusComp_PreInvokeMethod
Runtime BusComp.InvokeMethod
Server BusComp_InvokeMethod
Runtime Applet.InvokeMethod
Server WebApplet_InvokeMethod
Browser Applet_InvokeMethod

Essentially, the Runtime Event occurs before the equivalent server script event for the same object, plus the Applet browser script events &#8216;wrap&#8217; all server side events.All of which makes perfect logical sense, but it&#8217;s sometimes handy to see it written down [...]]]></description>
			<content:encoded><![CDATA[<p>A quick list, for reference:</p>
<ul>
<li><em>Runtime</em> Applet.PreInvokeMethod</li>
<li><em>Browser</em> Applet_PreInvokeMethod</li>
<li><em>Server</em> WebApplet_PreInvokeMethod</li>
<li><em>Runtime</em> BusComp.PreInvokeMethod</li>
<li><em>Server </em>BusComp_PreInvokeMethod</li>
<li><em>Runtime </em>BusComp.InvokeMethod</li>
<li><em>Server </em>BusComp_InvokeMethod</li>
<li><em>Runtime </em>Applet.InvokeMethod</li>
<li><em>Server </em>WebApplet_InvokeMethod</li>
<li><em>Browser </em>Applet_InvokeMethod</li>
</ul>
<p>Essentially, the Runtime Event occurs before the equivalent server script event for the same object, plus the Applet browser script events &#8216;wrap&#8217; all server side events.All of which makes perfect logical sense, but it&#8217;s sometimes handy to see it written down in a list.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/07/19/order-of-events/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Custom Popup Applets</title>
		<link>http://blog.notesonsiebel.com/2007/07/12/custom-popup-applets/</link>
		<comments>http://blog.notesonsiebel.com/2007/07/12/custom-popup-applets/#comments</comments>
		<pubDate>Wed, 11 Jul 2007 23:19:11 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/07/12/custom-popup-applets/</guid>
		<description><![CDATA[Obviously, with every implementation we do we aim to rollout a &#8216;vanilla&#8217; solution. By now, everyone has fully &#8216;bought in&#8217; to that mantra and understands the ongoing benefits of not over-customising. Having said that, there are still situations that justify slight, er, tweaks to the Siebel application&#8230;
A recent one for me included giving the user [...]]]></description>
			<content:encoded><![CDATA[<p>Obviously, with every implementation we do we aim to rollout a &#8216;vanilla&#8217; solution. By now, everyone has fully &#8216;bought in&#8217; to that mantra and understands the ongoing benefits of not over-customising. Having said that, there are still situations that justify slight, er, <i>tweaks</i> to the Siebel application&#8230;</p>
<p>A recent one for me included giving the user a list of options on completing an action. Now, I could get the result I needed by navigating to a new view, but the UI was pretty unfriendly. What I really wanted was a modal popup dialog.</p>
<p>In Siebel 7+ it&#8217;s possible to launch a pop-up applet from a normal applet by using the <b>ShowPopup</b> method. Details are in Bookshelf -&gt; Configuring Siebel eBusiness Applications -&gt; Configuring Special Purpose Applets -&gt; <a href="http://download.oracle.com/docs/cd/B31104_01/books/ConfigApps/ConfigApps_SpecialPurposeApps32.html" target="_blank" title="Bookshelf 7.8">Configuring Pop-Up Applets Launched from Applets</a>. To summarise the instructions:</p>
<ol>
<li>Add a control to your applet</li>
<li>Set the control <b>Method Invoked</b> to ShowPopup</li>
<li>Set the control User Property <b>Popup</b> to the name of your popup applet</li>
</ol>
<p>The popup applet specified in the user property must use a class derived from CSSSWEFramePopup. To see all possible classes select &#8216;Class&#8217; in Tools Object Explorer and query for &#8216;Super Class&#8217; = CSSSWEFramePopup:  the standard class for a popup list applet is <b>CSSSWEFrameListPopup</b>. (What if you <a href="http://blog.stuandgravy.com/2007/03/19/tools-object-explorer-options/" title="Siebel Tools object explorer options">can&#8217;t see Class in the object explorer</a>?) If you&#8217;re creating a new applet for your popup and you don&#8217;t expect edits in the popup, it&#8217;s simplest to configure your layout in &#8216;Base&#8217; mode.</p>
<p>The popup applet can be based on any business component in currently active business object, and will appear in context. So you could launch a popup from the Orders applet, for instance, and list all child Order Line Items. Alternatively, you can base your popup on a VBC and display any random list of choices you desire. Because it&#8217;s all in context, capturing the user action and invoking a change on the launching business component is trivial.</p>
<p>So that&#8217;s all good and easy; not even too much customisation. Click a button, up pops our applet. Now, the challenge for any bored configurators out there is this: <b>how do we automagically popup this applet on a new record when it&#8217;s written for the first time?</b> Suggestions welcomed in the comments&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/07/12/custom-popup-applets/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Implicit Joins</title>
		<link>http://blog.notesonsiebel.com/2007/06/14/implicit-joins/</link>
		<comments>http://blog.notesonsiebel.com/2007/06/14/implicit-joins/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 23:17:53 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/06/14/implicit-joins/</guid>
		<description><![CDATA[In a many-to-many relationship, it&#8217;s possible in the child business component to retrieve and set data on the current intersection record through an implicit join to the intersection table. In Siebel 7 you can see an example of this in action in the Opportunity: Contacts view: the Contact has a &#8216;Role&#8217; on the Opportunity and [...]]]></description>
			<content:encoded><![CDATA[<p>In a many-to-many relationship, it&#8217;s possible in the child business component to retrieve and set data on the current intersection record through an implicit join to the intersection table. In Siebel 7 you can see an example of this in action in the Opportunity: Contacts view: the Contact has a &#8216;Role&#8217; on the Opportunity and this is displayed in the list of Contacts. Examining the config in Tools, this role actually sits on the intersection record between the Opportunity and Contact, yet there&#8217;s no S_OPTY_CON join defined for Contact. Unlike most joined fields, the UI also allows the Role field to be edited, automatically saving data back to the intersection. The joys of implicit joins.</p>
<p>This behaviour is supported everywhere there&#8217;s a many-to-many parent-child relationship. When defining a new field, the Join property is bound to the list of joins defined for the business component. So the trick is to create a basic join to the intersection table &#8211; no need to specify a join spec or any details &#8211; then you can define your new fields and, when you&#8217;re done, delete the join. Siebel will recognise it as an implicit join and pick up data from the intersection record used to retrieve the child.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/06/14/implicit-joins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL Controls</title>
		<link>http://blog.notesonsiebel.com/2007/06/05/url-controls/</link>
		<comments>http://blog.notesonsiebel.com/2007/06/05/url-controls/#comments</comments>
		<pubDate>Mon, 04 Jun 2007 23:18:12 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/06/05/url-controls/</guid>
		<description><![CDATA[There are a couple of options to display a hyperlink to an external site from Siebel 7. The simplest is to set the following properties on an applet control:
- HTML Type: URL
- HTML Display Mode: EncodeData
This will URL-encode the field and wrap it in an HTML link tag &#60;a&#62;&#60;/a&#62;. As long as your field contains [...]]]></description>
			<content:encoded><![CDATA[<p>There are a couple of options to display a hyperlink to an external site from Siebel 7. The simplest is to set the following properties on an applet control:</p>
<blockquote><p>- HTML Type: URL<br />
- HTML Display Mode: EncodeData</p></blockquote>
<p>This will URL-encode the field and wrap it in an HTML link tag &lt;a&gt;&lt;/a&gt;. As long as your field contains a valid URL, you&#8217;ll have a working hyperlink. In the high-interactivity client the URL will by default open in a new browser window; to support the same behaviour in the standard interactivity client, set:</p>
<blockquote><p>- HTML Attributes: target=&#8217;_blank&#8217;</p></blockquote>
<p>This approach doesn&#8217;t allow you to change the link title, however, so if it&#8217;s a big ugly URL you&#8217;ll have a big ugly field displayed in your applet. As an alternative, you can hand-code the hyperlink. Set the calculated value on your field as follows:</p>
<blockquote><p>&#8220;&lt;a href=&#8217;<em>http://yourURL.com/yourtargetpage.html</em>&#8216; target=_blank&gt;Your Link Text&lt;/a&gt;&#8221;</p></blockquote>
<p>(Note the enclosing double-quotes.) Then set up your applet control:</p>
<blockquote><p>- HTML Type: Field<br />
- HTML Display Mode: DontEncodeData<br />
- Runtime: Y</p></blockquote>
<p>This tells the Siebel UI to interpret the contents of the field as raw HTML &#8211; so you see your hyperlink exactly as constructed.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/06/05/url-controls/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Detecting when a WriteRecord is New or Updated</title>
		<link>http://blog.notesonsiebel.com/2007/05/01/detecting-when-a-writerecord-is-new-or-updated/</link>
		<comments>http://blog.notesonsiebel.com/2007/05/01/detecting-when-a-writerecord-is-new-or-updated/#comments</comments>
		<pubDate>Mon, 30 Apr 2007 23:17:32 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Siebel]]></category>
		<category><![CDATA[Workflow]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/05/01/detecting-when-a-writerecord-is-new-or-updated/</guid>
		<description><![CDATA[Nathan&#8217;s enthusiatically followed up on his first contribution to eulogise about a couple of new Runtime Events&#8230;
This one is relatively simple but it is worth pointing out.  Sometimes its the little things that make you weep for joy as a developer.
In the bad old days of Siebel (i.e. before 7.7), the world was running [...]]]></description>
			<content:encoded><![CDATA[<p>Nathan&#8217;s enthusiatically followed up on his <a href="http://blog.stuandgravy.com/2007/04/12/workflow-process-business-objects/" title="Workflow Process Business Objects">first contribution</a> to eulogise about a couple of new Runtime Events&#8230;</p>
<blockquote><p><span class="q">This one is relatively simple but it is worth pointing out.  Sometimes its the little things that make you weep for joy as a developer.</span></p>
<p>In the bad old days of Siebel (i.e. before 7.7), the world was running around clubbing each other over the head, saying &#8220;ugh&#8221; a lot and wearing animal skins.  Then the light shone upon the world and we were given:</p>
<p><strong>WriteRecordNew </strong>and <strong>WriteRecordUpdated</strong>.</p>
<p>These are Runtime Events that I noticed just recently.  Many many times in config, you need to do something when a record is written. <span class="q">You place code on the WriteRecord event (so that you can avoid having to worry about the user doing Undo, stepping off a field and recorrecting etc). But then you need to do <em>different</em> things depending on whether the record is </span>new or updated.</p>
<p>Usually what you needed to do was <span class="q">set some global variable when</span> the NewRecord event fired, test that variable in WriteRecord, then clear the variable.  It usually worked, but it was not elegant. I have seen implementations where the code on the WriteRecord event runs into the thousands. But we won&#8217;t mention those. <span class="q"> </span></p>
<p><span class="q">Now, the great and glorious Siebel gods have seen fit to now provide us with Runtime Events that distinguish between New and Updated records! Hallelujah brother!</span></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/05/01/detecting-when-a-writerecord-is-new-or-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using MVG aggregate functions</title>
		<link>http://blog.notesonsiebel.com/2007/04/05/using-mvg-aggregate-functions/</link>
		<comments>http://blog.notesonsiebel.com/2007/04/05/using-mvg-aggregate-functions/#comments</comments>
		<pubDate>Thu, 05 Apr 2007 02:40:26 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/04/05/using-mvg-aggregate-functions/</guid>
		<description><![CDATA[Karan asked a question the other day: how to prevent the Status of a Service Request changing until all child Activities have been completed? This type of business rule is exactly what State Models are designed for: set up a model on Service Request Status and restrict transitions to the target status unless a condition [...]]]></description>
			<content:encoded><![CDATA[<p>Karan asked a question the other day: how to prevent the Status of a Service Request changing until all child Activities have been completed? This type of business rule is exactly what State Models are designed for: set up a model on Service Request Status and restrict transitions to the target status unless a condition has been satisfied. The difficulty in this example is how to write a rule based on child records?</p>
<p>State Model Rule Expressions use the same format as calculated field values, so the same MVG aggregate functions are available. The functions <code>Count</code>, <code>Sum</code> and <code>EXISTS</code> all derive a single value from a Multi Value Group and are an underused way to reduce scripting.</p>
<p>In the example given, Service Request has an MVG <code>Action</code> linked to the child Activities, so we can add a Multi Value Field to point to Action.Status. A rule expression <code>Not EXISTS([Action Status]&lt;&gt;'Done')</code> in the State Model transition gives the desired restriction.</p>
<p>There&#8217;s a good example of the EXISTS function in use in the vanilla Siebel 7 repository: see BC <code>Contact</code> field <code>Exists New OutBound Email Activities</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/04/05/using-mvg-aggregate-functions/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Searching Calculated Fields and performance</title>
		<link>http://blog.notesonsiebel.com/2007/04/03/searching-calculated-fields-and-performance/</link>
		<comments>http://blog.notesonsiebel.com/2007/04/03/searching-calculated-fields-and-performance/#comments</comments>
		<pubDate>Mon, 02 Apr 2007 22:59:11 +0000</pubDate>
		<dc:creator>stuandgravy</dc:creator>
				<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://blog.notesonsiebel.com/2007/04/03/searching-calculated-fields-and-performance/</guid>
		<description><![CDATA[The other day I was asked whether it&#8217;s possible to search calculated fields.  The simple answer is yes &#8211; as can easily be tested. The complete answer&#8217;s a little more complex: query the wrong calculated field and the application will hang, CPU resources off the scale. So how can you predict what calculations are [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was asked whether it&#8217;s possible to search calculated fields.  The simple answer is yes &#8211; as can easily be tested. The complete answer&#8217;s a little more complex: query the wrong calculated field and the application will hang, CPU resources off the scale. So how can you predict what calculations are going to cause you problems?</p>
<p>When you execute any query, Siebel converts the user&#8217;s logical instructions to SQL. It doesn&#8217;t always do an optimal job, but you can usually be sure that most of the effort will be pushed to the database server. The problem with calculated fields is that certain functions don&#8217;t have standard cross-platform SQL equivalents.</p>
<p>The IIf function, for example, will never be translated to native SQL. When your field calculation contains an IIf statement, Siebel will write SQL to return a superset of data. The Siebel object manager is then left with the job of paging through the results, evaluating the calculation for each row. Needless to say, if the incomplete SQL returns a large dataset, this ain&#8217;t going to be fast.In any particular example it&#8217;s worth eyeballing the SQL to confirm where the calculation is happening, but you can definitely expect problems with the following functions:</p>
<ul>
<li>IIf</li>
<li> IfNull</li>
<li> ToChar</li>
<li>Right</li>
</ul>
<p>Unfortunately, there&#8217;s no configuration way to prevent searching on an unpleasant field. If you&#8217;re running into problems then you&#8217;ll have to hit the PreQuery event with some scripting&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.notesonsiebel.com/2007/04/03/searching-calculated-fields-and-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
