Questions tagged [substring]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2
votes
0answers
27 views

Parsing for words in a text using Apex(multiline)

I am trying to parse a text for specific user names. string='SALc 38373945 is pending approval from X, Y, Z SALc 38373945 is pending approval from A' i want X,Y,Z,A to be extracted from string. ...
1
vote
1answer
28 views

Ending position out of bounds: 10

I am trying to get the first 10 characters from "Patient_Name__c" field into the "Patient_Id_Help__c" field but when i run the batch class it is throwing the error as "Ending position out of bounds: ...
0
votes
1answer
31 views

How to fetch the values from the String to store in a seprate string upto certain part

Hi I need to store the certain part of the string and store it in a separate integer variable. My Final string getResult = {"httpStatus":200,"httpRequestUri":"/sfsImagingservices/documents/followup/...
0
votes
1answer
50 views

AMPScript SubString Adding in Additional Character

I am trying to work out a way to personalize emails whereby I utilize the "Full Name" field but parse the data after the first space. I am having issues with my AMPScript for this block: %%[ SET @...
0
votes
1answer
95 views

Removing characters from data extension field via AMPScript

A field used in a sendable data extension contains a value that I'm trying to remove the beginning characters from then add the remaining characters to the end of a different URL. Example: Data ...
0
votes
1answer
378 views

How Can I Get A Substring From A Long Text Area Field?

I have a Description field of type Long Text Area. I'm trying to get the first few lines to display. 1. I tried creating a formula field LEFT(Description, 500) I get Error: You referenced an ...
2
votes
1answer
33 views

substring assignment to limit data to custom field

I have a custom object with a custom field Message__c designed to hold 4000 characters. However, the getBody in rare circumstances has exceeded the 4000 character limit and caused an error. I have ...
2
votes
1answer
679 views

How do I check if substring is out of bounds?

I'm trying to find a way to check if a substring causes an out of bounds error in an If statement This is what I have got so far but if the original string has less than 8 characters after substring ...
0
votes
1answer
236 views

Replace substring with masking character in Visualforce

How do I replace a substring with a masking character in Visualforce? For eg. I have a list of Contacts under an Account to be displayed on the Visualforce page - email field to be masked. username@...
0
votes
1answer
478 views

Check For Special Characters in Emails

I'm having a business requirement of searching special characters in Email Field(before @domain.com)in a trigger. For Ex: if a email is like this (t#@est@gmail.com).it should be able to identify the'#...
1
vote
2answers
89 views

Error on Apex Trigger when trying to use “substringAfter(' ')”

I started this issue in another post but figured I'd separate it so that I could go into further detail here. I'm attempting to remove the city that is after the space. As an example the variable is ...
0
votes
1answer
244 views

How to update record values through email body

I have a requirement to create case for specific subject email.I wrote an email service working well. But now i try to capture some values from email body and need to updatein specific field. Like ...
0
votes
1answer
573 views

Can I use Ampscript to remove the last character from a URL?

I am attempting to remove the last character from a URL string. Can I achieve this using Ampscript? It seems like it might be possible using lenght() and substring() and subtract() but I can't seem ...
1
vote
1answer
389 views

trim namefield from right in SOQL

How can I trim a namefield from right and have only last n Characters. I only found examples from left. I have the following SOQL where I tried this: [select Name, Body, BodyLength from Attachment ...
1
vote
2answers
33 views

Using IF Substring to change link or image based on the market the email goes to

I am currently using in email to call an image or link based on needs. %%[IF Substring(ISO_CNTRY_2_CD,1,2) == "US" THEN]%% <br><br>US<br><br> %%[ELSE]%% <br><br>CA&...
0
votes
1answer
59 views

Capture everything but the last 3 digits

I need to capture the value of a number without the digits. Let's say I need only 17 from 17,873. The number can also be without comma, like 17873. How can I do that with AMPscript substring? A round ...
1
vote
3answers
2k views

Check If String Starts With Any Of A Set<String>?

This is basically what I'm trying to accomplish: I have a Set of strings, for example: Set<String> emails = new Set<String>{'abuse@','database@','fbl@','ftp@'}; I also have a list of ...
0
votes
1answer
187 views

Replace double character with single in string

I have to replace double semicolon (;;) in a string with single comma(,) in an apex class. Can someone help me?
0
votes
1answer
465 views

get specific value from string based on separator

I have a code String[] base = new String[]{'my father | name is | bryan luke','my mother | go to | shopping mall'}; for(integer i=0; i < base.size(); i++) { String output = base[i]; ...
0
votes
2answers
252 views

how to get the value of string based on my separator

I need to get this string before my separator, in this case a pipe character ('|'). So if I have this data: Malcolm Bell Landgraab | EMP-00012 | Consultant Juliawati Sandra | EMP-00003 | Consultant ...
1
vote
1answer
329 views

Substring for a specific value

I have below string value from which I need a specific section to put in another string. Can someone please help? String [{"attributes":{"type":"Call2_vod__c","url":"/services/data/v37.0/sobjects/...