Skip to main content
Nintex Community Menu Bar
Question

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

  • July 11, 2024
  • 1 reply
  • 3 views
  • Translate

Forum|alt.badge.img+4

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.

Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Forum|alt.badge.img+9
  • Nintex Employee
  • 890 replies
  • July 11, 2024

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">
    <models>
        <model id="UIOnly" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
            <fields>
                <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"/>
            </fields>
            <conditions/>
            <actions>
                <action>
                    <actions>
                        <action type="updateRow" fieldmodel="TrackingModel" affectedrows="context" field="WhichRecordWasUpdated" enclosevalueinquotes="true" value="{{Id}}"/>
                    </actions>
                    <events>
                        <event>row.updated</event>
                    </events>
                    <fields/>
                </action>
            </actions>
        </model>
        <model id="TrackingModel" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
            <fields>
                <field id="WhichRecordWasUpdated" displaytype="UUID" label="Which record was updated?" defaultvaluetype="fieldvalue" ogdisplaytype="TEXT" defaultValue=""/>
            </fields>
            <conditions/>
            <actions/>
        </model>
    </models>
    <components>
        <grid uniqueid="sk-57H1A-226" columngutter="50px">
            <divisions>
                <division behavior="flex" minwidth="100px" ratio="1">
                    <components>
                        <template multiple="false" uniqueid="sk-58l0V-742" allowhtml="true">
                            <contents>&amp;lt;br/&amp;gt;
Explanation: 
&amp;lt;br/&amp;gt;
Add some rows to the table below, then change any field in any record.
&amp;lt;br/&amp;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. 
&amp;lt;br/&amp;gt;</contents>
                        </template>
                        <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">
                            <fields>
                                <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=""/>
                            </fields>
                            <rowactions>
                                <action type="edit"/>
                                <action type="delete"/>
                            </rowactions>
                            <massactions usefirstitemasdefault="true">
                                <action type="massupdate"/>
                                <action type="massdelete"/>
                            </massactions>
                            <views>
                                <view type="standard"/>
                            </views>
                            <searchfields/>
                        </skootable>
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" ratio="1" minwidth="100px">
                    <components>
                        <basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="TrackingModel" buttonposition="" uniqueid="sk-56aSb-1019" mode="readonly" layout="above">
                            <columns>
                                <column width="100%">
                                    <sections>
                                        <section title="Section A" collapsible="no" showheader="false">
                                            <fields>
                                                <field uniqueid="sk-57L29-271" id="WhichRecordWasUpdated" valuehalign="" type="">
                                                    <label>This will show the Id of the last record that was changed</label>
                                                </field>
                                            </fields>
                                        </section>
                                    </sections>
                                </column>
                            </columns>
                        </basicfieldeditor>
                    </components>
                </division>
            </divisions>
            <styles>
                <styleitem type="background" bgtype="none"/>
            </styles>
        </grid>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
        <actionsequences uniqueid="sk-557rC-249"/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>
Translate

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings