Is there way to capture the Id when the field is updated ?

  • 1
  • Question
  • Updated 4 months ago
  • Answered
The Flow is, whenever field is updated in table row, i need to capture the Id of the particular row. Tried using multiple approach but doesn't seems to be working. Any help would be appraciated.
Photo of ace


  • 500 Points 500 badge 2x thumb

Posted 4 months ago

  • 1
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 7,990 Points 5k badge 2x thumb
Hi Ace,

I think I understand the basic idea of what you're asking about. You can use a model action on the table's model to watch for a record to change, and trigger an action sequence to copy the Id of that row wherever you want. I've built a simple page that shows how this could be set up. I hope this helps! 

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
        <model id="UIOnly" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
                <field id="Id" displaytype="UUID" ogdisplaytype="TEXT" label="Id" defaultvaluetype="fieldvalue"/>
                <field id="Name" displaytype="TEXT" label="Name" defaultvaluetype="fieldvalue" defaultValue="Jenny"/>
                <field id="Age" displaytype="DOUBLE" label="Age" ogdisplaytype="TEXT" precision="9" scale="0" defaultvaluetype="fieldvalue" defaultValue="47"/>
                        <action type="updateRow" fieldmodel="TrackingModel" affectedrows="context" field="WhichRecordWasUpdated" enclosevalueinquotes="true" value="{{Id}}"/>
        <model id="TrackingModel" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
                <field id="WhichRecordWasUpdated" displaytype="UUID" label="Which record was updated?" defaultvaluetype="fieldvalue" ogdisplaytype="TEXT" defaultValue=""/>
        <grid uniqueid="sk-57H1A-226" columngutter="50px">
                <division behavior="flex" minwidth="100px" ratio="1">
                        <template multiple="false" uniqueid="sk-58l0V-742" allowhtml="true">
Add some rows to the table below, then change any field in any record.
&lt;br/&gt;A model action on this table's model will see the row that was changed and copy its Id into another model, which is then shown to the right. 
                        <skootable showconditions="true" showsavecancel="false" showerrorsinline="true" searchmethod="client" searchbox="false" showexportbuttons="false" pagesize="10" alwaysresetpagination="false" createrecords="true" model="UIOnly" buttonposition="" mode="edit" allowcolumnreordering="true" responsive="true" uniqueid="sk-55McZ-422" instantfilters="false">
                                <field id="Name" hideable="true" uniqueid="fi-57fwz-501" valuehalign="" type=""/>
                                <field id="Age" hideable="true" uniqueid="fi-57ify-543" decimalplaces="" valuehalign="" type=""/>
                                <field id="Id" hideable="true" uniqueid="fi-56IJM-970" valuehalign="" type=""/>
                                <action type="edit"/>
                                <action type="delete"/>
                            <massactions usefirstitemasdefault="true">
                                <action type="massupdate"/>
                                <action type="massdelete"/>
                                <view type="standard"/>
                <division behavior="flex" verticalalign="top" ratio="1" minwidth="100px">
                        <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="TrackingModel" buttonposition="" uniqueid="sk-56aSb-1019" mode="readonly" layout="above">
                                <column width="100%">
                                        <section title="Section A" collapsible="no" showheader="false">
                                                <field uniqueid="sk-57L29-271" id="WhichRecordWasUpdated" valuehalign="" type="">
                                                    <label>This will show the Id of the last record that was changed</label>
                <styleitem type="background" bgtype="none"/>
        <actionsequences uniqueid="sk-557rC-249"/>
        <styleitem type="background" bgtype="none"/>