Appended Multi-Line Text Field Questions

Forums Dynamic Forms for SharePoint Appended Multi-Line Text Field Questions

Tagged: 

This topic contains 2 replies, has 2 voices, and was last updated by  Keith Hudson 5 months, 3 weeks ago.

  • Author
    Posts
  • #20423

    Notrega
    Participant

    I have a multi-line plain text field that appends {FIELD1}, and I need the last entry as plain text in a html formatted letter. When I use {FIELD1} in the html it gives me all of the appended history, but I need just the last entry. So I used the code below from another thread to trigger a rule that sets another non-appending text field {FIELD2} and it works… until I touch the record again then the blank/empty append on {FIELD1} results in the rule emptying {FIELD2}.

    Is there an easier way to do what I want to do or is there something that I am missing?

    
    
    // Plain text fields
    $("#dffs_FIELD1 textarea").on("change",function(){
        spjs.dffs.triggerRule(["MultiLineTrigger"]);
    });
    
    // Enhanced Rich text fields
    var initialRteVal = getFieldValue("FIELD1").replace(/<[^>]*>/g,"");
    $("#dffs_FIELD1 div.ms-rtestate-write").on("blur",function(){
        var currVal = getFieldValue("FIELD1").replace(/<[^>]*>/g,"");
        if(currVal !== initialRteVal){
            spjs.dffs.triggerRule(["MultiLineTrigger"]);
        }
    });

    By the way – I just got access to DFFS last week and it is AWESOME!!! Thanks for a great tool!!!!

  • #20425

    Notrega
    Participant

    Never mind – it is working now… I think LOL

    If there is a better way I still would appreciate it.

  • #20433

    Keith Hudson
    Participant

    NOTE that the “Append to existing text” choice is horribly misnamed. It would be better named “show prior versions”. I never use it. Ever. Instead, I use a multi-lines of text plain text field.

    The easiest way to use it is to manually add text to the plain text field. Usually, however, I want to include a date and author stamp for each added piece of text, so just above that field on my form I insert a button using an html section, that runs a custom javascript function to create a timestamp and author stamp and pre-pend those to the existing text in the field, and position the cursor so I can just type my additional text after clicking the button.

    IF you need more details, post here and I’ll try to get time to capture some code and screenshots and add them to this discussion.

You must be logged in to reply to this topic.