<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title><![CDATA[Custom Functions How To & Help]]></title><link>http://fmforums.com/forum/showforum.php?fid/35/</link><description>General Discussions on developing custom functions with FileMaker Advanced</description><language>none</language><pubDate>Wed, 21 Jul 2010 16:45:07 GMT</pubDate><lastBuildDate>Wed, 21 Jul 2010 16:45:07 GMT</lastBuildDate><docs>http://blogs.law.harvard.edu/tech/rss</docs><generator>FusionBB 3.0 FINAL (www.fusionbb.com)</generator><item><title><![CDATA[Auditing Fields Modified By Script ]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215763</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215763</guid><description><![CDATA[ Hi All<br />
<br />
I have found a fantastic video tutorial on logging changes made to records freely available at the following url:<br />
<br />
  <a href="http://www.filemakermagazine.com/secured/popup/658/SuperAuditLogging_full.mov?width=800&amp;height=600&amp;access=189aec2174af5e8833d590515176d8ed" title="www.filemakermagazine.com/secured/popup/658/SuperAuditLogging_full.mov?width=800&amp;height=600&amp;access=189aec2174af5e8833d590515176d8ed" target="_blank">Filemaker Magazine Super Audit Logging Tutorial</a> <br />
<br />
<strong>Moderators: Please edit this post if this infringes copyright.</strong> I am assuming not on the basis Matt Petrowski mentions copyright issues in the video.<br />
<br />
All credit goes to Matt Petrowski and the original function creator Ray Cologon,NightWing Enterprises, Melbourne, Australia<br />
<a href="http://www.nightwing.com.au/FileMaker" title="www.nightwing.com.au/FileMaker" target="_blank">www.nightwing.com.au/FileMaker</a><br />
<br />
Function usage: AuditLog (Logfield; Fields; Format; Seperator)<br />
<br />
The code to the function is as follows:<br />
<br />
<pre><font class="code">Code:</font><br />
<code><span style="color: #000000"><br />
<span style="color: #0000BB">&nbsp;
Let</span><span style="color: #007700">(</span><span style="color: #0000BB">
</span><span style="color: #007700">[</span><span style="color: #0000BB">
</span><span style="color: #FF8000">//&nbsp;Setup

_Trigger&nbsp;=&nbsp;Fields;
_LogLength&nbsp;=&nbsp;Length(LogField);
_Script&nbsp;=&nbsp;Get(ScriptName);
_Repetition&nbsp;=&nbsp;Get(ActiveRepetitionNumber);
_RepeatFlag&nbsp;=&nbsp;If(_Repetition&nbsp;&gt;&nbsp;1;&nbsp;"["&nbsp;&amp;&nbsp;_Repetition&nbsp;&amp;&nbsp;"]");
_FieldName&nbsp;=&nbsp;Get(ActiveFieldName)&nbsp;&amp;&nbsp;_RepeatFlag;

//&nbsp;Locate&nbsp;Any&nbsp;Previous&nbsp;Field&nbsp;Value&nbsp;in&nbsp;Log

_FieldInLog&nbsp;=&nbsp;Position(LogField;&nbsp;Separator&nbsp;&amp;&nbsp;_FieldName&nbsp;&amp;&nbsp;Separator;&nbsp;1;&nbsp;1);
_Divider&nbsp;=&nbsp;Separator&nbsp;&amp;&nbsp;"-»"&nbsp;&amp;&nbsp;Separator;
_Start&nbsp;=&nbsp;Position(LogField;&nbsp;_Divider;&nbsp;_FieldInLog;&nbsp;1)&nbsp;+&nbsp;Length(_Divider);
_End&nbsp;=&nbsp;Position(LogField&nbsp;&amp;&nbsp;¶;&nbsp;¶;&nbsp;_FieldInLog;&nbsp;1);
_PreviousValue&nbsp;=&nbsp;If(_FieldInLog;&nbsp;Middle(LogField;&nbsp;_Start;&nbsp;_End&nbsp;-&nbsp;_Start);&nbsp;"[---]");

//&nbsp;New&nbsp;Field&nbsp;Value&nbsp;(fixes&nbsp;returns)

_FieldValue&nbsp;=&nbsp;GetField(_FieldName);
_FixedValue&nbsp;=&nbsp;Substitute(_FieldValue;&nbsp;¶;&nbsp;"‡");
_NewValue&nbsp;=&nbsp;If(Length(_FieldValue);&nbsp;_FixedValue;&nbsp;"[null]");

//&nbsp;Format&nbsp;Values

_%Date&nbsp;=&nbsp;GetAsDate(Get(CurrentHostTimeStamp));
_%Time&nbsp;=&nbsp;GetAsTime(Get(CurrentHostTimeStamp));
_%Account&nbsp;=&nbsp;Get(AccountName);
_%Field&nbsp;=&nbsp;_FieldName;
_%Change&nbsp;=&nbsp;_PreviousValue&nbsp;&amp;&nbsp;Separator&nbsp;&amp;&nbsp;"-»"&nbsp;&amp;&nbsp;Separator&nbsp;&amp;&nbsp;_NewValue;
_%Table&nbsp;=&nbsp;Get&nbsp;(LayoutTableName);
_%Layout&nbsp;=&nbsp;Get(LayoutName);
_%Key&nbsp;=&nbsp;GetAsNumber&nbsp;(Get(CurrentHostTimeStamp))&nbsp;&amp;&nbsp;_PreviousValue&nbsp;&amp;&nbsp;_NewValue;

_LogFormat&nbsp;=&nbsp;Substitute(&nbsp;Format;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Date";&nbsp;_%Date&nbsp;&amp;&nbsp;Separator];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Time";&nbsp;_%Time&nbsp;&amp;&nbsp;Separator];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Account";&nbsp;_%Account&nbsp;&amp;&nbsp;Separator];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Field";&nbsp;_%Field&nbsp;&amp;&nbsp;Separator];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Change";&nbsp;_%Change&nbsp;&amp;&nbsp;Separator];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Table";&nbsp;_%Table&nbsp;&amp;&nbsp;Separator];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Layout";&nbsp;_%Layout&nbsp;&amp;&nbsp;Separator];
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;["%Key";&nbsp;_%Key&nbsp;&amp;&nbsp;Separator]
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);
_LogString&nbsp;=&nbsp;Left(&nbsp;_LogFormat;&nbsp;Length(&nbsp;_LogFormat&nbsp;)&nbsp;-&nbsp;Length(&nbsp;Separator&nbsp;)&nbsp;)

];

If(&nbsp;Length(_FieldName)&nbsp;and&nbsp;Length(_Script)&nbsp;=&nbsp;0;
&nbsp;&nbsp;_LogString&nbsp;&amp;&nbsp;Left(¶;&nbsp;_LogLength)&nbsp;&amp;&nbsp;LogField;
&nbsp;&nbsp;LogField
&nbsp;&nbsp;)

)

&nbsp;//&nbsp;Original&nbsp;Function&nbsp;by&nbsp;Ray&nbsp;Cologon
//&nbsp;NightWing&nbsp;Enterprises,&nbsp;Melbourne,&nbsp;Australia
//&nbsp;www.nightwing.com.au/FileMaker

//&nbsp;Revised&nbsp;by&nbsp;Matt&nbsp;Petrowsky&nbsp;</span><span style="color: #0000BB"></span><br />
</span><br />
</code><br />
</pre><br />
<br />
<br />
I have been playing around with this for hours now trying to get the function to audit changes made by a script. Obviously my coding skills aren't quite up to it.<br />
<br />
Can anyone give me any pointers?<br />
<br />
Thanks in advance<br />
<br />
Lee ]]></description><pubDate>Wed, 21 Jul 2010 16:40:37 GMT</pubDate></item><item><title><![CDATA[Recording marketing activity]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215487</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215487</guid><description><![CDATA[ Hi<br />
<br />
I have taken the template for contact management and converted the fields to suit my needs.<br />
<br />
Each record will be for a client and I will be recording their address, my main contact, secondary contact and various information about their company.  So far so good and all up and running!<br />
<br />
The bit I am stuck with is to do with recording marketing activity.<br />
<br />
I want to be able to do the following<br />
<br />
Do a search/sort and select say 50 companies.<br />
<br />
Then I will print an address label for these companies to use for a mailshot.<br />
<br />
I then want to be able to record on all of their files that I have sent them the mailshot eg flyerJuly2010.<br />
<br />
I would need to be able to keep a history of all mailshots sent.<br />
<br />
I would also like to be able to use this recorded information to search for companies that have received mailshots.<br />
<br />
I pressume that this is possible but just cant work out the best way or how to do it!<br />
<br />
All help appreciated.<br />
<br />
Thanks<br />
<br />
<br />
Oliver. ]]></description><pubDate>Thu, 01 Jul 2010 22:36:12 GMT</pubDate></item><item><title><![CDATA[Send and Recive Gmail from my FM Solution]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215425</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215425</guid><description><![CDATA[ Hi!<br />
I got a quick question.<br />
<br />
Is there any way to make my Filemaker solution to send and recieve emails strait from within my solution?<br />
I need the outgoing and incoming emails to be saved like a "chat" or "log" so that i can follow the Email conversations for each and every client in my database.<br />
<br />
There will be multiple users and they will all be using Gmail.<br />
<br />
Really really grateful for any help I can get.<br />
<br />
Thanks<br />
<br />
<br />
Freddy ]]></description><pubDate>Sun, 27 Jun 2010 12:14:58 GMT</pubDate></item><item><title><![CDATA[UniqueListFast and UniqueListCountFast]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215388</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215388</guid><description><![CDATA[ This is a highly optimized version of the "Unique List" function.<br />
<br />
I was having terrible performance problems with the common "unique list" algorithm (as seen <a href="http://www.briandunning.com/cf/596" title="http://www.briandunning.com/cf/596" target="_blank">http://www.briandunning.com/cf/596</a> ) and similar.<br />
<br />
The issue is that these functions use both the RightValues and CountValues functions -- both of which require filemaker to (A) separate the list into separate values, and (B) process the entire list.<br />
<br />
I realized that when looking for unique values, we only need to find the First non-unique value -- at that point we can short-circuit the calculation.    <br />
<br />
And, since values are separated by paragraph characters, we can actually just use a character-based method which turns out to be much faster since it doesn't require turning a string into a list of separate values.<br />
<br />
Without further ado, I present "UniqueListFast":<br />
<br />
<pre><font class="code">Code:</font><br />
<code><span style="color: #000000"><br />
<span style="color: #0000BB">&nbsp;UniqueListFast</span><span style="color: #007700">(</span><span style="color: #0000BB">theList</span><span style="color: #007700">)</span><span style="color: #0000BB">

</span><span style="color: #FF8000">//&nbsp;recursive&nbsp;function&nbsp;that&nbsp;takes&nbsp;a&nbsp;list&nbsp;and&nbsp;returns&nbsp;only&nbsp;the&nbsp;unique&nbsp;items

//&nbsp;This&nbsp;is&nbsp;highly&nbsp;optimized&nbsp;for&nbsp;speed&nbsp;--&nbsp;instead&nbsp;of&nbsp;using&nbsp;CountValues&nbsp;and&nbsp;FilterValues&nbsp;,&nbsp;we&nbsp;use&nbsp;character-based&nbsp;comparisons&nbsp;using&nbsp;
//&nbsp;Position()&nbsp;which&nbsp;short-circuit&nbsp;the&nbsp;match

Let(&nbsp;
[&nbsp;&nbsp;&nbsp;this&nbsp;=&nbsp;&nbsp;GetValue&nbsp;(&nbsp;theList&nbsp;;&nbsp;1&nbsp;)&nbsp;&nbsp;//&nbsp;the&nbsp;value&nbsp;we&nbsp;are&nbsp;testing&nbsp;for&nbsp;uniqueness
&nbsp;;
&nbsp;&nbsp;nThis&nbsp;&nbsp;=&nbsp;Length(this)&nbsp;;&nbsp;&nbsp;//&nbsp;character&nbsp;length&nbsp;of&nbsp;this&nbsp;value&nbsp;
&nbsp;&nbsp;nList&nbsp;=&nbsp;Length(theList)&nbsp;//&nbsp;character&nbsp;length&nbsp;of&nbsp;list

]
;
Case(
 &nbsp;theList&nbsp;=&nbsp;""&nbsp;&nbsp;;&nbsp;""&nbsp;;&nbsp;&nbsp;//&nbsp;end&nbsp;of&nbsp;list
&nbsp;&nbsp;theList&nbsp;=&nbsp;"¶"&nbsp;;&nbsp;""&nbsp;&nbsp;;//&nbsp;end&nbsp;of&nbsp;list

&nbsp;&nbsp;//&nbsp;if&nbsp;we&nbsp;find&nbsp;a&nbsp;second&nbsp;instance&nbsp;of&nbsp;this&nbsp;item?&nbsp;then&nbsp;skip&nbsp;this&nbsp;item,&nbsp;or&nbsp;include&nbsp;this&nbsp;item&nbsp;if&nbsp;unique
&nbsp;&nbsp;//&nbsp;note&nbsp;hack&nbsp;here:&nbsp;since&nbsp;we&nbsp;are&nbsp;searching&nbsp;for&nbsp;"¶this"&nbsp;we&nbsp;automatically&nbsp;will&nbsp;skip&nbsp;the&nbsp;1st&nbsp;instance!
&nbsp;&nbsp;If&nbsp;(&nbsp;Position(&nbsp;theList;&nbsp;¶&nbsp;&amp;&nbsp;this&nbsp;;&nbsp;1&nbsp;;&nbsp;1)&nbsp;&gt;&nbsp;0&nbsp;;&nbsp;&nbsp;""&nbsp;;&nbsp;this&nbsp;&amp;&nbsp;"¶"&nbsp;&nbsp;&nbsp;&nbsp;)
&nbsp;&nbsp;//&nbsp;and&nbsp;process&nbsp;rest&nbsp;of&nbsp;list&nbsp;recursively
&nbsp;&nbsp;&amp;&nbsp;&nbsp;UniqueListFast(&nbsp;Right(theList;&nbsp;nList-&nbsp;nThis&nbsp;-&nbsp;1)&nbsp;)
)  
)&nbsp;</span><span style="color: #0000BB"></span><br />
</span><br />
</code><br />
</pre><br />
<br />
<br />
And the sister function which simply returns a count of the unique values<br />
<br />
<pre><font class="code">Code:</font><br />
<code><span style="color: #000000"><br />
<span style="color: #0000BB">&nbsp;
UniqueListCountFast</span><span style="color: #007700">(</span><span style="color: #0000BB">startCount</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">theList</span><span style="color: #007700">)</span><span style="color: #0000BB">

</span><span style="color: #FF8000">//&nbsp;recursive&nbsp;function&nbsp;that&nbsp;takes&nbsp;a&nbsp;list&nbsp;and&nbsp;returns&nbsp;the&nbsp;count&nbsp;of&nbsp;unique&nbsp;items

//&nbsp;This&nbsp;is&nbsp;a&nbsp;highly&nbsp;optimized&nbsp;version&nbsp;which&nbsp;uses&nbsp;Position()&nbsp;which&nbsp;can&nbsp;short-circuit&nbsp;the&nbsp;match
//&nbsp;other&nbsp;versions&nbsp;use&nbsp;FilterValues&nbsp;and&nbsp;RightValues&nbsp;which&nbsp;are&nbsp;very&nbsp;slow

Let(&nbsp;
[&nbsp;&nbsp;&nbsp;this&nbsp;=&nbsp;&nbsp;GetValue&nbsp;(&nbsp;theList&nbsp;;&nbsp;1&nbsp;)&nbsp;&nbsp;//&nbsp;the&nbsp;value&nbsp;we&nbsp;are&nbsp;testing&nbsp;for&nbsp;uniqueness
&nbsp;;
&nbsp;&nbsp;nThis&nbsp;&nbsp;=&nbsp;Length(this)&nbsp;;&nbsp;&nbsp;//&nbsp;character&nbsp;length&nbsp;of&nbsp;this&nbsp;value&nbsp;
&nbsp;&nbsp;nList&nbsp;=&nbsp;Length(theList)&nbsp;&nbsp;//&nbsp;character&nbsp;length&nbsp;of&nbsp;list

]
;
Case(
 &nbsp;theList&nbsp;=&nbsp;""&nbsp;&nbsp;;&nbsp;currentCount&nbsp;&nbsp;;&nbsp;&nbsp;//&nbsp;end&nbsp;of&nbsp;list
&nbsp;&nbsp;theList&nbsp;=&nbsp;"¶"&nbsp;;&nbsp;currentCount&nbsp;&nbsp;&nbsp;;//&nbsp;end&nbsp;of&nbsp;list

&nbsp;&nbsp;//&nbsp;note&nbsp;hack&nbsp;here:&nbsp;since&nbsp;we&nbsp;are&nbsp;searching&nbsp;for&nbsp;"¶this"&nbsp;we&nbsp;automatically&nbsp;will&nbsp;skip&nbsp;the&nbsp;1st&nbsp;instance!
&nbsp;&nbsp;//&nbsp;unique?
&nbsp;&nbsp;Position(&nbsp;theList;&nbsp;¶&nbsp;&amp;&nbsp;this&nbsp;;&nbsp;1&nbsp;;&nbsp;1)&nbsp;&gt;&nbsp;0&nbsp;;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;not&nbsp;unique
&nbsp;&nbsp;&nbsp;&nbsp;UniqueListCountFast(&nbsp;currentCount&nbsp;;&nbsp;Right(theList;&nbsp;nList-&nbsp;nThis&nbsp;-&nbsp;1)&nbsp;)&nbsp;&nbsp;;&nbsp;//&nbsp;currentCount&nbsp;+&nbsp;restOfList

&nbsp;&nbsp;//&nbsp;unique&nbsp;&nbsp;
&nbsp;&nbsp;UniqueListCountFast(&nbsp;currentCount&nbsp;+&nbsp;1&nbsp;;&nbsp;Right(theList;&nbsp;nList-&nbsp;nThis&nbsp;-&nbsp;1)&nbsp;)&nbsp;&nbsp;//&nbsp;currentCount&nbsp;+&nbsp;1&nbsp;+&nbsp;restOfList

)  

)
&nbsp;</span><span style="color: #0000BB"></span><br />
</span><br />
</code><br />
</pre><br />
 ]]></description><pubDate>Wed, 23 Jun 2010 19:13:40 GMT</pubDate></item><item><title><![CDATA[Recursive Custom function]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215312</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215312</guid><description><![CDATA[ Hi There<br />
<br />
Need some help with this<br />
Looking for a custom function. that does this<br />
field 1 =<br />
jim<br />
sally<br />
susan<br />
dave<br />
-------------------------------------<br />
the output should be<br />
<br />
jim<br />
jim sally<br />
jim sally susan<br />
jim sally susan dave<br />
sally<br />
sally susan<br />
sally susan dave<br />
susan<br />
susan dave<br />
dave<br />
<br />
Any help would be appreciated. I did this in a script but it was way to long and I felt that a recursive function would be alot shorter<br />
<br />
Thanks Again<br />
Stu ]]></description><pubDate>Fri, 18 Jun 2010 17:27:30 GMT</pubDate></item><item><title><![CDATA[auto serial number as a slave]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215203</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215203</guid><description><![CDATA[ Hi! I have a problem. as a Customer and equipment, I have two layout. I will give auto serial number for customer id. I want to give also auto serial number for equipment as a related by Customer.<br />
<br />
For example My Customer name "John" and id number 1.<br />
If John takes five equipment, five equipment id number get 1, 2, 3, 4 and 5. after that Customer name "George" and id number 2,  George takes four equipment.  four equipment id number get 6, 7, 8 and 9. It will go on like this. How can I make me by using file maker? Thanks all friends. ]]></description><pubDate>Thu, 10 Jun 2010 21:17:59 GMT</pubDate></item><item><title><![CDATA[CF to remove chars from text]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215077</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215077</guid><description><![CDATA[ Despite how hard I try I can't incorporate the logic of recursive functions into a working syntax, so any help is appreciated:<br />
<br />
The task is to selectively remove from a return delimited list either a certain number of characters from the start of each line or up to a certain character (e.g. inderscore _).<br />
I suppose that the logic should be something like the following pseudo-code (as if it was a script):<br />
<br />
1. Count the number of lines<br />
2. Define the number of characters from start<br />
3. Go to first line<br />
4. Loop<br />
5. Do Replace Function (String; From;To;"")<br />
6. Go to next line <br />
7. Exit Loop if Line &gt; Number of Lines<br />
<br />
Another thing would also be to be able to define the search character up to which chars will be deleted.<br />
Can anyone help? ]]></description><pubDate>Thu, 03 Jun 2010 09:24:00 GMT</pubDate></item><item><title><![CDATA[..]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215056</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215056</guid><description><![CDATA[ That did the trick. The substitute function. Great.... let me be your humble servant <img src="/forum/images/smilies/wink.gif" alt="" /><br />
<br />
And the quotes around the expression of course(they are a leftover during my tests)<br />
<br />
But I am still kinda confused. I do not understand how the substitute function can help here. The return type is still text. So you substitute text with text ?!?!?<br />
 ]]></description><pubDate>Wed, 02 Jun 2010 06:32:44 GMT</pubDate></item><item><title><![CDATA[Custom Barcode Labels]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215044</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215044</guid><description><![CDATA[ Now I know im not the only one who has had problems trying to print their own  <a href="http://www.aclabels.co.uk" title="www.aclabels.co.uk" target="_blank">custom barcode labels</a> . I started trying to print my own about 6 months ago but kept encountering lots of problems. I downloaded good software and bought a label printer (Zebra), but still I came across problems. Does anyone have any suggestions on software to use? Im close to giving up and really need some help!<br />
<br />
Thanks<br />
<br />
 ]]></description><pubDate>Tue, 01 Jun 2010 13:50:37 GMT</pubDate></item><item><title><![CDATA[Passing function as parameter]]></title><link>http://fmforums.com/forum/showtopic.php?tid/215043</link><guid isPermaLink='false'>http://fmforums.com/forum/showtopic.php?tid/215043</guid><description><![CDATA[ Well hello<br />
<br />
<br />
I am try to pass a function A as a parameter to function B. This function A will return true OR false. I want a second function B to count the number of records, based on the first function A. The condition is the function A I am trying to pass.<br />
<br />
<span class='underline'>Problem:</span><br />
The passed function A is not evaluating correctly. The condition is always being evaluated as True.<br />
<br />
<br />
<br />
<span class='underline'>Example:</span><br />
I am calling this code out of a table field(Type: formular).<br />
<br />
<pre><font class="code">Code:</font><br />
Let([
expression="GetNthRecord (rekla_rt_Ersatz::Type ; start_recordno)=\"Loaner\""

];
recordcount_on_expression ( rekla_rt_Ersatz::ID ; expression; 1 )
)<br />
</pre><br />
<br />
<br />
<span class='underline'>This is the function:</span><br />
<br />
recordcount_on_expression ( primary_key_field ; expression; start_recordno )<br />
<pre><font class="code">Code:</font><br />
<code><span style="color: #000000"><br />
<span style="color: #0000BB">&nbsp;

If</span><span style="color: #007700">(</span><span style="color: #0000BB">IsValid&nbsp;</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">GetNthRecord&nbsp;</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">primary_key_field</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">start_recordno</span><span style="color: #007700">)&nbsp;);</span><span style="color: #0000BB">

case&nbsp;</span><span style="color: #007700">(</span><span style="color: #0000BB">
Evaluate</span><span style="color: #007700">(</span><span style="color: #DD0000">"expression"</span><span style="color: #007700">);</span><span style="color: #0000BB">

1&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">recordcount_on_expression&nbsp;</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">primary_key_field&nbsp;</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">expression</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">start_recordno&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">);</span><span style="color: #0000BB">
&nbsp;
recordcount_on_expression&nbsp;</span><span style="color: #007700">(&nbsp;</span><span style="color: #0000BB">primary_key_field&nbsp;</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">expression</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">start_recordno&nbsp;</span><span style="color: #007700">+&nbsp;</span><span style="color: #0000BB">1&nbsp;</span><span style="color: #007700">)</span><span style="color: #0000BB">

</span><span style="color: #007700">)</span><span style="color: #0000BB">

</span><span style="color: #007700">;</span><span style="color: #0000BB">0</span><span style="color: #007700">)&nbsp;</span><span style="color: #0000BB"></span><br />
</span><br />
</code><br />
</pre><br />
<br />
<br />
<br />
I hope somebody has a clue. Thanks a lot<br />
<br />
Bye<br />
Robert ]]></description><pubDate>Tue, 01 Jun 2010 12:15:34 GMT</pubDate></item></channel></rss>