<?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>GeeKs Blogging @ dotCOM &#187; Calculated Function</title>
	<atom:link href="http://geeksbloggingat.com/topics/calculated-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://geeksbloggingat.com</link>
	<description>Let&#039;s share...</description>
	<lastBuildDate>Tue, 30 Aug 2011 21:29:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Siebel &#8211; Left, Right and from the Middle</title>
		<link>http://geeksbloggingat.com/2009/08/12/siebel-left-right-and-from-the-middle/</link>
		<comments>http://geeksbloggingat.com/2009/08/12/siebel-left-right-and-from-the-middle/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 09:04:28 +0000</pubDate>
		<dc:creator>Nitin Jain</dc:creator>
				<category><![CDATA[Siebel CRM]]></category>
		<category><![CDATA[Business Component]]></category>
		<category><![CDATA[Calculated Function]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Scriptless solutions]]></category>
		<category><![CDATA[Siebel]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://geeksbloggingat.com/?p=761</guid>
		<description><![CDATA[Extracting a sub string from a lengthy string in Siebel. What is the best solution you can think up for this typical problem? I know, I know, you and you colleagues have done this thousands of times before. But, have you ever successfully done it without using a single line of scripting?!! Now, it becomes [...]


<b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/05/10/siebel-invokeservicemethod-on-calculated-fields/' rel='bookmark' title='Permanent Link: Siebel &#8211; InvokeServiceMethod() on Calculated Fields'>Siebel &#8211; InvokeServiceMethod() on Calculated Fields</a> <small>InvokeServiceMethod() is used to invoke Business Services and take values...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/23/siebel-make-mvg-field-required-ii/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make MVG Field required &#8211; II'>Siebel &#8211; Make MVG Field required &#8211; II</a> <small>Hi friends, This is a follow-up post of the post...</small></li>
<li><a href='http://geeksbloggingat.com/2009/04/22/siebel-make-a-field-require-conditionally/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make a field Required, conditionally'>Siebel &#8211; Make a field Required, conditionally</a> <small>There was a requirement in our project to make Account...</small></li>
<li><a href='http://geeksbloggingat.com/2009/08/13/siebel-symbolic-strings-usage/' rel='bookmark' title='Permanent Link: Siebel &#8211; Symbolic Strings &#8211; Usage'>Siebel &#8211; Symbolic Strings &#8211; Usage</a> <small>Symbolic Strings appear directly in Siebel Tools&#8217; Object Explorer, an...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/08/siebel-eai-siebel-adapter-search-spec/' rel='bookmark' title='Permanent Link: Siebel &#8211; EAI Siebel Adapter Search Spec'>Siebel &#8211; EAI Siebel Adapter Search Spec</a> <small>Hi, I can bet that for anybody who has worked...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Extracting a sub string from a lengthy string in Siebel. What is the best solution you can think up for this typical problem? I know, I know, you and you colleagues have done this thousands of times before. But, have you ever successfully done it without using a single line of scripting?!!</p>
<p>Now, it becomes interesting! <img src='http://geeksbloggingat.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><span id="more-761"></span>Not that I am saying, it&#8217;s entirely possible only by configuration. At the very least I don&#8217;t know how it&#8217;s possible that way.</p>
<p>Let&#8217;s assume a test string:<br />
<i>var strng = &#8220;abcdefghijklmnopqrstuvwxyz1234567890&#8243;;</i></p>
<p><b>Requirement : Take the first 5 characters from the above string in another substring</b><br />
Solution 1:<br />
<i>var sub_strng = strng.substr( 0,5 );</i></p>
<p>Output:<br />
<i>abcde</i></p>
<p>Solution 2 : Using Left() function.<br />
Take it in a Calculated field. Use the expression,<br />
<i>Left( strng, 5 )</i></p>
<p>Output:<br />
<i>abcde</i><br />
I have noticed that at times, this does not work within eScript. Should work with VB and in Calculated Expressions.</p>
<p><b>Requirement : Take the last 5 characters from the above string in another substring</b><br />
Solution 1:<br />
<i>var sub_strng = strng.substr( (strng.length &#8211; 5),5 );</i></p>
<p>Output:<br />
<i>67890</i></p>
<p>Solution 2 : Using Right() function.<br />
Take it in a Calculated field. Use the expression,<br />
<i>Right( strng,5 )</i></p>
<p>Output:<br />
<i>67890</i><br />
I have noticed that at times, this does not work within eScript. Should work with VB and in Calculated Expressions.</p>
<p><b>Requirement : Take the middle 5 characters from the above string in another substring (assume &#8216;cdefg&#8217;)</b><br />
Solution 1:<br />
<i>var sub_strng = strng.substr( 2,5 );</i></p>
<p>Output:<br />
<i>cdefg</i></p>
<p>Solution 2 : Using Mid() function.<br />
Take it in a Calculated field. Use the expression,<br />
<i>Mid( strng,2,5 )</i></p>
<p>Output:<br />
<i>cdefg</i><br />
I have noticed that at times, this does not work within eScript. Should work with VB and in Calculated Expressions.</p>
<p>Using Calculated Expressions where these are very commonly required, does save scripting at times.</p>
<p>Trust me, this really works!! <img src='http://geeksbloggingat.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>


<p><b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/05/10/siebel-invokeservicemethod-on-calculated-fields/' rel='bookmark' title='Permanent Link: Siebel &#8211; InvokeServiceMethod() on Calculated Fields'>Siebel &#8211; InvokeServiceMethod() on Calculated Fields</a> <small>InvokeServiceMethod() is used to invoke Business Services and take values...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/23/siebel-make-mvg-field-required-ii/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make MVG Field required &#8211; II'>Siebel &#8211; Make MVG Field required &#8211; II</a> <small>Hi friends, This is a follow-up post of the post...</small></li>
<li><a href='http://geeksbloggingat.com/2009/04/22/siebel-make-a-field-require-conditionally/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make a field Required, conditionally'>Siebel &#8211; Make a field Required, conditionally</a> <small>There was a requirement in our project to make Account...</small></li>
<li><a href='http://geeksbloggingat.com/2009/08/13/siebel-symbolic-strings-usage/' rel='bookmark' title='Permanent Link: Siebel &#8211; Symbolic Strings &#8211; Usage'>Siebel &#8211; Symbolic Strings &#8211; Usage</a> <small>Symbolic Strings appear directly in Siebel Tools&#8217; Object Explorer, an...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/08/siebel-eai-siebel-adapter-search-spec/' rel='bookmark' title='Permanent Link: Siebel &#8211; EAI Siebel Adapter Search Spec'>Siebel &#8211; EAI Siebel Adapter Search Spec</a> <small>Hi, I can bet that for anybody who has worked...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://geeksbloggingat.com/2009/08/12/siebel-left-right-and-from-the-middle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Siebel &#8211; Make a field Required, conditionally</title>
		<link>http://geeksbloggingat.com/2009/04/22/siebel-make-a-field-require-conditionally/</link>
		<comments>http://geeksbloggingat.com/2009/04/22/siebel-make-a-field-require-conditionally/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 10:51:29 +0000</pubDate>
		<dc:creator>Madhvi Arora</dc:creator>
				<category><![CDATA[Siebel CRM]]></category>
		<category><![CDATA[Calculated Function]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[eScript]]></category>
		<category><![CDATA[Scriptless solutions]]></category>
		<category><![CDATA[Siebel]]></category>
		<category><![CDATA[User Property]]></category>

		<guid isPermaLink="false">http://geeksbloggingat.com/?p=124</guid>
		<description><![CDATA[There was a requirement in our project to make Account Field required in Quote entity conditionally. Had it not been optional, we would have done this by the setting the &#8216;Required&#8217; property to TRUE for the field in the applet. But, then it would not be conditional, and would always be required. So, we used [...]


<b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/04/23/siebel-showing-red-asterisk-on-a-conditional-required-field/' rel='bookmark' title='Permanent Link: Siebel &#8211; Showing red asterisk on a conditionally required field'>Siebel &#8211; Showing red asterisk on a conditionally required field</a> <small>In Siebel vanilla Application, we see a red asterisk (...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/22/siebel-make-mvg-field-required/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make MVG Field required'>Siebel &#8211; Make MVG Field required</a> <small>Siebel supports the concept of Multi Valued Fields, or the...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/23/siebel-make-mvg-field-required-ii/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make MVG Field required &#8211; II'>Siebel &#8211; Make MVG Field required &#8211; II</a> <small>Hi friends, This is a follow-up post of the post...</small></li>
<li><a href='http://geeksbloggingat.com/2009/04/24/html-code-in-error-message/' rel='bookmark' title='Permanent Link: Siebel &#8211; HTML Code displayed in Error Message'>Siebel &#8211; HTML Code displayed in Error Message</a> <small>There was a requirement in our project to make Account...</small></li>
<li><a href='http://geeksbloggingat.com/2010/05/02/siebel-admin-mode-flag/' rel='bookmark' title='Permanent Link: Siebel &#8211; Admin Mode Flag'>Siebel &#8211; Admin Mode Flag</a> <small>In my last project,we had a requirement of Admin Views,...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>There was a requirement in our project to make Account Field required in Quote entity conditionally. Had it not been optional, we would have done this by the setting the &#8216;Required&#8217; property to TRUE for the field in the applet. But, then it would not be conditional, and would always be required.</p>
<p><span id="more-124"></span>So, we used an BC field level User Property, &#8216;Required&#8217;. We created an expression which conditionally evaluated to TRUE or FALSE as per our requirement, and we used this against the Required User Property.</p>
<p>Thus, we were able to set the field to required successfully. Though this solved our problem initially, it brought with itself another set of problems which I will discuss in the posts to come.</p>


<p><b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/04/23/siebel-showing-red-asterisk-on-a-conditional-required-field/' rel='bookmark' title='Permanent Link: Siebel &#8211; Showing red asterisk on a conditionally required field'>Siebel &#8211; Showing red asterisk on a conditionally required field</a> <small>In Siebel vanilla Application, we see a red asterisk (...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/22/siebel-make-mvg-field-required/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make MVG Field required'>Siebel &#8211; Make MVG Field required</a> <small>Siebel supports the concept of Multi Valued Fields, or the...</small></li>
<li><a href='http://geeksbloggingat.com/2009/06/23/siebel-make-mvg-field-required-ii/' rel='bookmark' title='Permanent Link: Siebel &#8211; Make MVG Field required &#8211; II'>Siebel &#8211; Make MVG Field required &#8211; II</a> <small>Hi friends, This is a follow-up post of the post...</small></li>
<li><a href='http://geeksbloggingat.com/2009/04/24/html-code-in-error-message/' rel='bookmark' title='Permanent Link: Siebel &#8211; HTML Code displayed in Error Message'>Siebel &#8211; HTML Code displayed in Error Message</a> <small>There was a requirement in our project to make Account...</small></li>
<li><a href='http://geeksbloggingat.com/2010/05/02/siebel-admin-mode-flag/' rel='bookmark' title='Permanent Link: Siebel &#8211; Admin Mode Flag'>Siebel &#8211; Admin Mode Flag</a> <small>In my last project,we had a requirement of Admin Views,...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://geeksbloggingat.com/2009/04/22/siebel-make-a-field-require-conditionally/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Siebel &#8211; LookUpName() and LookUpValue()</title>
		<link>http://geeksbloggingat.com/2009/04/17/siebel-lookupname-and-lookupvalue/</link>
		<comments>http://geeksbloggingat.com/2009/04/17/siebel-lookupname-and-lookupvalue/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 03:47:21 +0000</pubDate>
		<dc:creator>Nitin Jain</dc:creator>
				<category><![CDATA[Siebel CRM]]></category>
		<category><![CDATA[Calculated Function]]></category>
		<category><![CDATA[eScript]]></category>
		<category><![CDATA[Scriptless solutions]]></category>
		<category><![CDATA[Siebel]]></category>

		<guid isPermaLink="false">http://geeksbloggingat.com/?p=66</guid>
		<description><![CDATA[Hi all, I was working for a multi lingual implementation recently. This means, the Status on the Order Header was in English if the language selection of logged in user was English, and in Swedish if the language of the logged in user was Swedish. I came across this problem that at times when the [...]


<b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/06/24/siebel-lov-number-limitation/' rel='bookmark' title='Permanent Link: Siebel &#8211; LOV Number Limitation'>Siebel &#8211; LOV Number Limitation</a> <small>Siebel List of Values is probably the most commonly used...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/11/siebel-looping-multiple-records-update-records/' rel='bookmark' title='Permanent Link: Siebel &#8211; Looping multiple records &#8211; Update records'>Siebel &#8211; Looping multiple records &#8211; Update records</a> <small>Hi, We often come across a requirement where we need...</small></li>
<li><a href='http://geeksbloggingat.com/2010/03/20/siebelsis-om-pmt-service/' rel='bookmark' title='Permanent Link: Siebel &#8211; SIS OM PMT Service'>Siebel &#8211; SIS OM PMT Service</a> <small>There are lots of vanilla business services available in Siebel...</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/09/siebel-eai-siebel-adapter-looping-multiple-records/' rel='bookmark' title='Permanent Link: Siebel &#8211; EAI Siebel Adapter &#8211; Looping Multiple Records'>Siebel &#8211; EAI Siebel Adapter &#8211; Looping Multiple Records</a> <small>This is a follow-up post on the post, Siebel &#8211;...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/03/siebel-eai-queue-usage/' rel='bookmark' title='Permanent Link: Siebel &#8211; EAI Queue &#8211; Usage'>Siebel &#8211; EAI Queue &#8211; Usage</a> <small>I had introduced the concept of Siebel EAI Queues in...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>I was working for a multi lingual implementation recently. This means, the Status on the Order Header was in English if the language selection of logged in user was English, and in Swedish if the language of the logged in user was Swedish.</p>
<p>I came across this problem that at times when the user invoked my custom method on the Orders screen by clicking a button, the Order Status value was passed in his native language &#8211; English (ENU) or Swedish (SVE). </p>
<p><span id="more-66"></span><br />
The requirement was to<br />
1) read the existing status,<br />
2) do some processing based on as to what the status was, and<br />
3) then reset the Order Status to some new value.</p>
<p>The setting of the Status (3) was not a major issue, as I directly used LookUpValue() function for that which is used very commonly in the Siebel community. </p>
<p>The LookUpValue() function in Siebel queries the S_LST_OF_VAL table in Siebel DB with a combination of TYPE and the LIC (Language Independent Code), and returns the Display Value of that particular LOV.</p>
<p>Step (2) was also not a major issue, achieved through custom workflows.</p>
<p>However, when reading the value in the step (1) to do some processing, it became difficult. The problem was that the Status field could return either of the Swedish or the English value when invoking the custom workflow in step (2). The only option that seemed to be working at the moment was to hard code the values from both the languages, both ENU and SVE. I felt this as a very bad solution. That is when I came across this vanilla Siebel function called LookUpName() which in principle works exactly opposite to LookUpValue().</p>
<p>The function LookUpName() queries on S_LST_OF_VAL table with a combination of TYPE and Display Value (or LIC Code too) and returns the LIC Code in return. This meant, I need not hard code the Order status values in my workflow processing in step (2) for branching. I just started running a LookUpName() on the Order Status received in the beginning, which returned me the LIC code corresponding to that Status. </p>
<p>This LIC code is Language Independent and thus, same in all languages. Thus, I can now do all branching in my custom workflow based on only one LIC code value, and thus it becomes much cleaner! </p>
<p>This also had an added advantage that if the client (CRM owner) decides to implement more languages to this multilingual application, he just needs to apply the corresponding language pack. No changes to script or Workflows are needed.</p>
<p>Please note that I did this using Workflow Output step which meant no Scripting was needed.</p>
<p>Thus, my problem was resolved.</p>


<p><b>Related posts:<b><ol><li><a href='http://geeksbloggingat.com/2009/06/24/siebel-lov-number-limitation/' rel='bookmark' title='Permanent Link: Siebel &#8211; LOV Number Limitation'>Siebel &#8211; LOV Number Limitation</a> <small>Siebel List of Values is probably the most commonly used...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/11/siebel-looping-multiple-records-update-records/' rel='bookmark' title='Permanent Link: Siebel &#8211; Looping multiple records &#8211; Update records'>Siebel &#8211; Looping multiple records &#8211; Update records</a> <small>Hi, We often come across a requirement where we need...</small></li>
<li><a href='http://geeksbloggingat.com/2010/03/20/siebelsis-om-pmt-service/' rel='bookmark' title='Permanent Link: Siebel &#8211; SIS OM PMT Service'>Siebel &#8211; SIS OM PMT Service</a> <small>There are lots of vanilla business services available in Siebel...</small></li>
<li><a href='http://geeksbloggingat.com/2009/07/09/siebel-eai-siebel-adapter-looping-multiple-records/' rel='bookmark' title='Permanent Link: Siebel &#8211; EAI Siebel Adapter &#8211; Looping Multiple Records'>Siebel &#8211; EAI Siebel Adapter &#8211; Looping Multiple Records</a> <small>This is a follow-up post on the post, Siebel &#8211;...</small></li>
<li><a href='http://geeksbloggingat.com/2009/05/03/siebel-eai-queue-usage/' rel='bookmark' title='Permanent Link: Siebel &#8211; EAI Queue &#8211; Usage'>Siebel &#8211; EAI Queue &#8211; Usage</a> <small>I had introduced the concept of Siebel EAI Queues in...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://geeksbloggingat.com/2009/04/17/siebel-lookupname-and-lookupvalue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

