Cannot empty the value of a lookup through the action framework

  • 2
  • Problem
  • Updated 3 years ago
  • Solved
Hi,

Since Banzai creating an action 'Update a field on row(s)' if its a lookup and you leave it empty does not remove the content.
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Pablo.  I don't think it ever worked direclty in the Action framework.  I've known this going back at least into the summer.  Look at this post: https://community.skuidify.com/skuid/topics/best-way-to-set-value-of-field-to-null-blank
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
HAHAHAHA!!! Banzai!!!!

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true">
   <models>
      <model id="Contacts" limit="20" query="true" createrowifnonefound="false" adapter="" type="" sobject="Contact">
         <fields>
            <field id="AccountId"/>
            <field id="blank" uionly="true" displaytype="TEXT" label="blank" readonly="true" returntype="TEXT"/>
         </fields>
         <conditions/>
         <actions/>
      </model>
   </models>
   <components>
      <skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Contacts" buttonposition="" mode="read" uniqueid="sk-1d7U81-135">
         <fields>
            <field type="COMBO" valuehalign="">
               <label>AccountId</label>
               <template>{{{AccountId}}}</template>
            </field>
         </fields>
         <rowactions>
            <action type="edit"/>
            <action type="delete"/>
            <action type="multi" label="Remove Account Ref" icon="sk-icon-magic">
               <actions>
                  <action type="updateRow" fieldmodel="Contacts" field="AccountId" enclosevalueinquotes="true" value="{{blank}}"/>
               </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>
</skuidpage>
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
That's hacking at its best.  Using a feature to solve a problem that was not originally identified as a requirement for the feature. Thanks Pat.
(Edited)
Photo of Pablo Martinez

Pablo Martinez

  • 2,468 Points 2k badge 2x thumb
Thanks!!!!
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Hah, yeah, UI Only fields open up a lot of possibilities. :)