I have a request to parse the description field and extract multiple values for certain entries such as: username = xxx fname = aaa lname = bbb. Once I have extracted these values they need to be conditionally rendered in the UI to make it easier for our users to know which case record they want to manage.
I am having issues with extracting the value after username = which should then be added to the case.classification. I tried the instr function but not getting the results am after.
End Result is like this: CAM - username. or CAM - xxx.
Case are being iterated through an aura component and rendered
<!-- CAM -->
<!-- add indicator (parse description for first and last name -->
<aura:if isTrue="{!case.Classification__c == 'CAM' }">
<aura:if isTrue="{!case.Sub_Classification__c == 'New' }">
<!-- {! case.Description } -->
{instr(! case.Description, 'username =')}
<aura:set attribute="else">
{! case.Classification__c + (not(empty(case.Sub_Classification__c)) ? ' (' + case.Sub_Classification__c + ')': '') }
</aura:set>
</aura:if>