update text field on row but not lose original note on field

  • 1
  • Question
  • Updated 1 year ago
  • Answered
Hi Wondering if there's any way to accomplish the following:

I want to automatically add some text on a Large Text field, by the click of a button.
But problem is , often this field already contains notes that i don't want to overwrite

Is there a way to accomplish this using the action " Update field on row" without losing original notes?

I do this often with WF or PB in SF by using formula "some text" & br() & Text_field__c

Which basically inputs my new note (some text) and add its on top of exiting note

Thank you
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb

Posted 1 year ago

  • 1
Photo of Jeff Rutter

Jeff Rutter

  • 1,162 Points 1k badge 2x thumb
Dave....

This is definitely possible in Skuid! 

  • Create a button
  • use action to update field on row...choose your field you want to update here
  • in the value you want to set it to use merge syntax and then add your text on to the end.
  • So the value field in the action could be {{$Model.myModelName.data.0.myModelField__c}} test value
  • When you click the button it will update to what is in the field and append test value text to the end.
  • I think you can replace 'test value' with another merge syntax if you used a UI only field. Didn't test it, but would imagine that would work.
Hope that helps!

-Jeff Rutter
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Hey Jeff, thank you for help. Have you ever tried this?

As i had tried this prior to posting and just tried again.

and i keep losing the original text in field...

Here's syntax i used: {{$Model.AccountAppW.data.0.Sales_Notes__c}} This is a test  

any ideas?
Photo of Jeff Rutter

Jeff Rutter

  • 1,162 Points 1k badge 2x thumb
Dave,

Yes, I did test this before posting to you. The org I tried it in is on Banzai still and I created this on a detail page. Not sure if version or my use case test might have anything to do with our differences here! Glad Stephen shared something that worked for you!

-Jeff
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
I was able to make a basic reproduction page and the XML is below. I think this might be what you're describing as far as I can tell.

Steps to reproduce:
1. Click pencil to edit
2. Add text to Field "New Text to add to the end"
3. Press Row action of Two pieces of paper.
4. Notice that the End result has added the section to the end.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" useviewportmeta="true" showheader="false">    <models>
        <model id="account" limit="5" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Account">
            <fields>
                <field id="Name"/>
                <field id="Description"/>
                <field id="AddingTextFormula" uionly="true" displaytype="FORMULA" ogdisplaytype="TEXT" readonly="true" returntype="TEXT" label="Adding Text Formula">
                    <formula>{{Description}}+" "+{{NewTexttoaddtotheEnd}}</formula>
                </field>
                <field id="NewTexttoaddtotheEnd" uionly="true" displaytype="TEXT" label="New Text to add to the End" defaultvaluetype="fieldvalue"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
    </models>
    <components>
        <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" alwaysresetpagination="false" createrecords="true" buttonposition="" mode="read" allowcolumnreordering="true" responsive="true" uniqueid="sk-vTJeg-83" model="account">
            <fields>
                <field id="Name" hideable="true" uniqueid="fi-vTUbQ-125" valuehalign="" type=""/>
                <field id="NewTexttoaddtotheEnd" hideable="true" uniqueid="fi-vizi3-346" valuehalign="" type=""/>
                <field id="Description" hideable="true" uniqueid="fi-vgbml-111" valuehalign="" type="">
                    <label>End Result of added text</label>
                </field>
            </fields>
            <rowactions>
                <action type="edit"/>
                <action type="delete"/>
                <action type="multi" label="Add Text to the End" icon="sk-icon-notes-and-attachments">
                    <actions>
                        <action type="updateRow" fieldmodel="account" affectedrows="context" field="Description" enclosevalueinquotes="true" value="{{AddingTextFormula}}"/>
                        <action type="save">
                            <models>
                                <model>account</model>
                            </models>
                        </action>
                    </actions>
                </action>
            </rowactions>
            <massactions usefirstitemasdefault="true">
                <action type="massupdate"/>
                <action type="massdelete"/>
            </massactions>
            <views>
                <view type="standard"/>
            </views>
        </skootable>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
    <interactions/>
</skuidpage>
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Thank you Stephen, that approach did work!

Thx
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Pardon me while I do a victory lap. WWWAAAAAAAHHHHOOOOOOOOOOOOOOOOOOOO