How to concatenate id's from one model into another model.

Jaiti,

You can get all of the Id’s from a model using merge syntax. Note that I have included a comma next to the {{Id}}

{{#$Model.Accounts.data}}{{Id}},{{/$Model.Accounts.data}}

Here is an example page that uses this merge syntax along with a Formula field to remove the last comma from the merge ‘output’. Click the button ‘Get Ids’ to see this work.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="false" useviewportmeta="true" showheader="false">
    <models>
        <model id="Accounts" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" sobject="Account">
            <fields>
                <field id="Id"/>
                <field id="Name"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="UIOnly" limit="20" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true">
<fields>
    <field id="CleanIds" displaytype="FORMULA" label="CleanIds" ogdisplaytype="TEXT" readonly="true" returntype="TEXT">
        <formula>LEFT({{FromActionIds}},(LEN({{FromActionIds}}) - 1))</formula>
    </field>
    <field id="FromActionIds" displaytype="TEXT" label="FromActionIds" length="5000"/>
</fields>
<conditions/>
<actions/>
</model>
        
    </models>
    <components>
        <grid uniqueid="sk-1RBR-1706" columngutter="4px">
            <divisions>
                <division behavior="specified" verticalalign="top" width="50vw">
                    <components>
<buttonset model="Accounts" uniqueid="sk-1VFk-554" position="left">
    <buttons>
        <button type="multi" label="Get Ids" uniqueid="sk-1VGJ-939">
            <actions>
                <action type="updateRow" fieldmodel="UIOnly" affectedrows="context" field="FromActionIds" enclosevalueinquotes="true" value="{{#$Model.Accounts.data}}{{Id}},{{/$Model.Accounts.data}}"/>
            </actions>
        </button>
    </buttons>
</buttonset>
<basicfieldeditor showheader="true" showsavecancel="false" showerrorsinline="true" model="UIOnly" uniqueid="sk-1VGE-903" mode="edit" layout="above">
    <columns layoutmode="fixed">
        <column uniqueid="sk-1VGE-899" width="100%">
            <sections>
                <section title="Section A" uniqueid="sk-1VGE-900">
                    <fields>
                        <field uniqueid="sk-1VGE-905" id="FromActionIds"/>
                    </fields>
                </section>
                <section title="Section B" uniqueid="sk-1VGE-902">
                    <fields>
                        <field uniqueid="sk-1VGE-904" id="CleanIds"/>
                    </fields>
                </section>
            </sections>
        </column>
    </columns>
</basicfieldeditor>
                        
                    </components>
                </division>
                <division behavior="flex" verticalalign="top" minwidth="100px" ratio="1">
                    <components>
<skootable showconditions="true" showsavecancel="true" showerrorsinline="true" searchmethod="server" searchbox="true" showexportbuttons="false" hideheader="false" hidefooter="false" pagesize="10" alwaysresetpagination="false" createrecords="true" model="Accounts" buttonposition="" mode="read" allowcolumnreordering="true" responsive="true" uniqueid="sk-1R8C-408" heading="Accounts">
                            <fields>
                                <field id="Id" uniqueid="fi-1R8C-409"/>
                                <field id="Name" uniqueid="fi-1R8C-410"/>
                            </fields>
                            <rowactions>
                                <action type="edit"/>
                                <action type="delete"/>
                            </rowactions>
                            <massactions usefirstitemasdefault="true">
                                <action type="multi" label="Concat" icon="sk-icon-magic">
                                    <actions>
                                        <action type="custom" snippet="newSnippet"/>
                                        <action type="adoptRows" sourcemodel="Accounts" targetmodel="Accounts_Adopt" affectedrows="context"/>
                                        <action type="updateRow" fieldmodel="Accounts_Adopt" affectedrows="all" field="currval" enclosevalueinquotes="false" value="1"/>
                                    </actions>
                                </action>
                            </massactions>
                            <views>
                                <view type="standard"/>
                            </views>
                            <actions defaultlabel="Global Actions" defaulticon="sk-icon-magic" usefirstitemasdefault="true"/>
                        </skootable>
                        
                    </components>
                </division>
            </divisions>
            <styles>
                <styleitem type="background" bgtype="none"/>
            </styles>
        </grid>
        
    </components>
    <resources>
        <labels/>
        <javascript>
            
        </javascript>
        <css/>
        <actionsequences uniqueid="sk-3N03-382">
            <actionsequence id="d5becc77-bad2-4efa-beb5-7924c60b3c26" label="OppsQuery" type="reusable" uniqueid="sk-1R88-357">
                <description/>
                <actions>
                    <action type="blockUI"/>
                    <action type="requeryModel" model="Opps" behavior="loadmore"/>
                    <action type="unblockUI"/>
                </actions>
            </actionsequence>
            <actionsequence id="5cd052c7-9b17-4ef0-b17c-fe3761ba4adc" label="New Sequence" type="reusable" uniqueid="sk-1R88-358">
                <description/>
                <actions/>
            </actionsequence>
        </actionsequences>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>

Thanks,

Bill