Set Single Line column to value of Multiline column
- This topic has 2 replies, 2 voices, and was last updated 9 years ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
Home › Forums › Classic DFFS › Set Single Line column to value of Multiline column
Hi there
I often hide the title field of a list in new and edit forms in favour of using a multi-line text column and using a workflow to sub-string characters from the beginning of the multi-line and setting the title field to that value. All works well, but when used in a task list with email alerts to the assignee the alert is issued before the workflow is finished so the title of the task isn’t included. If the multi-line has less than 255 characters I can set the title field in DFFS, but if there are more than 255 an error is the result.
Anyone know the code I’d need to use to sub-string the multi-line to get the first 75 characters?
Thanks, Gerry
You can add this function to the Custom JS – change the “Description” fieldname to match your multiline field.
function dffs_PreSaveAction(){
var fullText = getFieldValue("Description");
setFieldValue("Title",fullText.substring(0,75));
}
Alexander
THanks Alexander
Works a treat