<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarcrm.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Calculated fields - get value from a field within the same module</title><link>https://sugarclub.sugarcrm.com/explore/help-forums/enterprise-professional/f/enterprise-professional-questions/2279/calculated-fields---get-value-from-a-field-within-the-same-module</link><description>Hi all, Here&amp;#39;s what I&amp;#39;d like to achieve. We have a custom module (called Opportunities) in which we can attach documents (contracts). There&amp;#39;s is a tab called &amp;quot;Contracts&amp;quot; within that module. Within that &amp;quot;Contracts&amp;quot; tab, we have several fields but only</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Calculated fields - get value from a field within the same module</title><link>https://sugarclub.sugarcrm.com/thread/13382?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2016 09:12:23 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:a4a82a22-1e84-45e8-abb6-f44c7a0a2f35</guid><dc:creator>C&amp;#233;dric Raoul</dc:creator><description>&lt;p&gt;Hi jshaheen,&lt;/p&gt;&lt;p&gt;Your answer seems to be the one to use in this specific case. However, if your formula does work with all the other fields, it didn&amp;#39;t work with the file field. Was worth the try though! &lt;/p&gt;&lt;p&gt;Thanks again for your contribution! I did learn something that may be useful in the future! &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculated fields - get value from a field within the same module</title><link>https://sugarclub.sugarcrm.com/thread/13381?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2016 00:34:45 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:d9822657-7b28-4919-a36d-d31bdfa35baa</guid><dc:creator>Jill Shaheen</dc:creator><description>&lt;p&gt;Hello C&amp;eacute;dric,&lt;/p&gt;&lt;p&gt;I haven&amp;#39;t tested this with a file field, but assuming it behaves as any string, you can extract a portion of the file name using the subStr function. Fortunately, your file-naming convention is standardized. Where the file name is &lt;span style="color:#000000;"&gt;&amp;quot;yyyy-mm - contract number - name of client.pdf&amp;quot;, the contract&amp;#39;s number is always preceded by 10 characters. Hopefully, the internal number is also a set number of chars. For this example, let&amp;#39;s assume it&amp;#39;s 6 digits.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#000000;"&gt;The formula for contract_number would be as follows, where 10 is the position of the first char to extract (that&amp;#39;s actually the 11th, because the first character is position 0) and 6 is the length of the text you want.&lt;/span&gt;&lt;/p&gt;&lt;p style="color:#000000;"&gt;&lt;code style="font-weight:inherit;font-style:inherit;"&gt;subStr($contract_attachment,10,6)&lt;/code&gt;&lt;code style="font-weight:inherit;font-style:inherit;"&gt; &lt;/code&gt;&lt;/p&gt;&lt;p style="color:#000000;"&gt;&lt;strong&gt;Update&lt;/strong&gt;: just noticed you want the yyyy-mm included. That would be:&lt;/p&gt;&lt;p style="color:#000000;"&gt;&lt;code style="font-weight:inherit;font-style:inherit;"&gt;subStr($contract_attachment,0,16)&lt;/code&gt;&lt;code style="font-weight:inherit;font-style:inherit;"&gt;&lt;/code&gt;&lt;/p&gt;&lt;p style="color:#000000;"&gt;Give it a try and let us know if that works!&lt;/p&gt;&lt;p style="color:#000000;"&gt;Best regards,&lt;/p&gt;&lt;p style="color:#000000;"&gt;Jill Shaheen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Calculated fields - get value from a field within the same module</title><link>https://sugarclub.sugarcrm.com/thread/13380?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2016 23:13:01 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:dd33c25b-dbc8-42f7-a945-788efa37b2c2</guid><dc:creator>Dan Kallish</dc:creator><description>&lt;p&gt;Hello Cedric,&lt;/p&gt;&lt;p&gt;To copy the value of a field in the same module you would set the Formula to be &amp;#39;$&amp;#39; and then the field name.&amp;nbsp; For example, if I wanted to copy the value of the Name field in a module into another field, my Formula would simply be: $name&lt;/p&gt;&lt;p&gt;I recommend reviewing the &lt;a href="http://support.sugarcrm.com/Documentation/Sugar_Versions/7.6/Pro/Administration_Guide/Developer_Tools/Studio/#Using_Sugar_Logic" rel="nofollow" target="_blank"&gt;Sugar Logic&lt;/a&gt; documentation to review additional details about the available functions.&lt;/p&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Dan Kallish&lt;/p&gt;&lt;p&gt;Advanced Support Engineer&lt;/p&gt;&lt;p&gt;SUGARCRM&lt;/p&gt;&lt;p&gt;&lt;span&gt;Learning Resources: &lt;/span&gt;&lt;a href="http://support.sugarcrm.com" rel="nofollow" target="_blank"&gt;http://support.sugarcrm.com&lt;/a&gt;&lt;span&gt; | &lt;/span&gt;&lt;a href="http://university.sugarcrm.com" rel="nofollow" target="_blank"&gt;http://university.sugarcrm.com&lt;/a&gt;&lt;span&gt; | &lt;/span&gt;&lt;a href="http://community.sugarcrm.com" rel="nofollow" target="_blank"&gt;http://community.sugarcrm.com&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>