You need to sign in to do that
Don't have an account?
gregj777
Adding standard text at the end of a value
Wondering if someone has an idea on how to add text at the end of a value after it has been entered. I have a field where the user enters a value but I want the result to add a standard text so they don't have to retype all the time.
Ex. User enters: 12.5
Result is: 12.5 cm H2O ( so the standard text is "cm H2O" all the time)
Thanks.
Workflow is the solution for you.
Activate the workflow and enjoy :)
All Answers
Is the field type - text ? Also, is the value to be appended always the same ?
You can setup a workflow rule to update the field value, whenever a record is created or updated.
Add a workflow action - Field update. In the field value, select use a formula and use RPAD function to append the desired value.
Workflow is the solution for you.
Activate the workflow and enjoy :)
RPAD
- text is the field or expression after which you want to insert characters.
- pad_length is the number of total characters in the text string that will be returned.
- pad_string is the character or characters that should be inserted. pad_string is optional and defaults to a blank space.
If the value in text is longer than pad_string, text is truncated to the size of padded_length.RPAD(Name, 20) truncates the Name field after 20 characters. For example, if the name is salesforce.com, the value returned is “salesforce.com.”
My_Company: No Change
RPAD('my_company.com', 14, 'z') returns “my_company.com” without change because it has 14 characters.
Account Name: Padding with a Character
RPAD(Name, 15, 'z') returns “salesforce.comz” .
Account Name: Truncating
RPAD(Name, 2) truncates the name after the second character. For example, if the name is salesforce.com, the value returned is “sa.”
So RPAD is not helpful here I guess.
Worked...thank you.