<turbo-stream action="update" target="wiki_card"><template>

<h1>BEFORELAST</h1>
<div class="trix-content"><h1>BeforeLast(data,substring)</h1><p>The <code>##BEFORELAST</code> formula refers to a function designed to extract or manipulate a portion of a string based on the position of a specific delimiter, focusing on everything <strong>before the last occurrence</strong> of that delimiter.&nbsp;</p><p><strong>Example:<br></strong><br></p><pre>##BEFORELAST('Here we are', ' ')&nbsp; will return 'Here we'</pre><p><br></p><p><br><strong>Example:<br><br>The field name consists of ' Samuel Worobel'.&nbsp;</strong></p><pre>##BEFORELAST("Name",' ')</pre><p><br>It will extract the <strong>first name ( Samuel)</strong>&nbsp;from a full name where the last name is separated by a space. If there were multiple spaces, only the text up to the last space would be returned.</p><p>&nbsp;Then, if you only need to retrieve the last name, you can use the function<a href="https://wiki.myrapidi.com/wiki/last"> Last()</a>.</p><p><br></p></div>
</template></turbo-stream>

