<turbo-stream action="update" target="wiki_99_subpage_3587_info"><template>
<h1>BlankValue(expr, expr2)</h1><p>The <code>##BLANKVALUE</code> formula is used to handle cases where a value might be <strong>blank</strong> (null, empty, or missing) by providing a fallback or default value. It checks whether a given value is blank and, if so, returns an alternate value; otherwise, it returns the original value.<br><br>The function can be used indepdently or in combination with other formulas such as ##DBLOOKUP, ##IF, ##EQUALS, ##LSLOOKUP.&nbsp;<br><br></p><p><strong>Examples:<br></strong><br></p><blockquote><strong>##BLANKVALUE(TAXGROUP, 'LOCAL')</strong></blockquote><p><br>This formula will return 'LOCAL' if the value of the TAXGROUP field is blank or null, otherwise it returns the value of the TAXGROUP field.<br><br></p><blockquote><strong>##BLANKVALUE(Payment_Terms_Code__c,SKIPFIELD())</strong></blockquote><p><br>If <code>Payment_Terms_Code__c</code> has a value (i.e., it is not blank):</p><ul><li>The formula returns the value of <code>Payment_Terms_Code__c</code>.</li><li>The field is updated or mapped with this value.</li></ul><p>If <code>Payment_Terms_Code__c</code> is blank:</p><ul><li>The formula evaluates to <code>SKIPFIELD()</code>, and the field is <strong>skipped</strong> (left unchanged).</li><li>No update or mapping occurs for this field.</li></ul><p><strong>&nbsp;</strong></p><blockquote><strong>##IF(EQUALS(DBLookup('DESTDS','User','Alias',"Salesperson",'Id'),''), DBLookup('DESTDS','User','Alias','MB','Id'),DBLookup('DESTDS','User','Alias',"Salesperson",'Id'))</strong>&nbsp; &nbsp;</blockquote><p>OR</p><blockquote><strong>##BlankValue(DBLookup('DESTDS','User','Alias',"Salesperson",'Id'), DBLookup('DESTDS','User','Alias','MB','Id'))</strong></blockquote><h3><strong>Step-by-Step Explanation:&nbsp;</strong></h3><p><br></p><ul><li><strong>First Lookup</strong>:</li></ul><p><code>DBLookup('DESTDS', 'User', 'Alias', "Salesperson", 'Id')</code>:</p><ol><li>Queries the <code>'User'</code> table in the <code>'DESTDS'</code> data source.</li><li>Searches for a record where the <code>'Alias'</code> field matches <code>"Salesperson"</code>.</li><li>Returns the value of the <code>'Id'</code> field if a match is found.</li><li>If no match is found or the result is blank, the formula moves to the second argument.</li></ol><ul><li><strong>Fallback Lookup</strong>:</li></ul><p><code>DBLookup('DESTDS', 'User', 'Alias', 'MB', 'Id')</code>:</p><ol><li>Queries the same <code>'User'</code> table in the <code>'DESTDS'</code> data source.</li><li>Searches for a record where the <code>'Alias'</code> field matches <code>'MB'</code>.</li><li>Returns the value of the <code>'Id'</code> field if a match is found.</li><li>This value is used only if the first <code>DBLookup</code> returns blank.</li></ol><p><strong>Behavior of </strong><strong><code>##BlankValue</code></strong>:</p><ol><li>If the first lookup (<code>"Salesperson"</code>) succeeds, its result is returned.</li><li>If the first lookup fails (returns blank), the result of the second lookup (<code>'MB'</code>) is returned.</li></ol><p><br></p>
</template></turbo-stream>
<turbo-stream action="prepend" target="flash"><template></template></turbo-stream>
