can i 'UI Only field' from one model as 'filter condition' in another model ?

  • 2
  • Problem
  • Updated 2 years ago
  • In Progress
I have been trying to use UI Only field in another model on 'filterable condition'. But, i'm getting error saying, i haven't included that UI Only field in the source model, which is not right 

In this i'm trying to load a Opportunity Model based on 'UI only' field in another Opportunity Model

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" showheader="true" tabtooverride="Opportunity">    <models>
        <model id="Opportunity" limit="100" query="true" createrowifnonefound="false" sobject="Opportunity" type="" datasource="salesforce">
            <fields>
                <field id="Name"/>
                <field id="CreatedDate"/>
                <field id="AccountId"/>
                <field id="Account.Name"/>
                <field id="Account.Description"/>
                <field id="Account.AccountNumber"/>
                <field id="OppFirstName" uionly="true" displaytype="FORMULA" ogdisplaytype="TEXT" readonly="true" returntype="TEXT">
                    <formula>LEFT({{Name}}, 10)</formula>
                </field>
            </fields>
            <conditions/>
            <actions/>
        </model>
        <model id="AnotherOpportunity" limit="20" query="true" createrowifnonefound="false" datasource="salesforce" type="" sobject="Opportunity">
            <fields/>
            <conditions>
                <condition type="modelmerge" value="" field="Name" operator="starts with" model="Opportunity" enclosevalueinquotes="true" mergefield="OppFirstName" novaluebehavior="deactivate"/>
            </conditions>
            <actions/>
        </model>
    </models>
    <components>
        <pagetitle model="Opportunity" uniqueid="sk-39TG_-76">
            <maintitle>
                <template>{{Model.labelPlural}}</template>
            </maintitle>
            <subtitle>
                <template>Home</template>
            </subtitle>
            <actions>
                <action type="savecancel"/>
            </actions>
        </pagetitle>
        <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="false" pagesize="10" createrecords="true" model="Opportunity" mode="read" uniqueid="sk-39TG_-77">
            <fields>
                <field id="Name" allowordering="true"/>
                <field id="CreatedDate" allowordering="true"/>
                <field id="AccountId" valuehalign="" type="" optionsource="" displaytemplate="{{Name}}{{#Description}}-{{Description}}{{/Description}}" searchtemplate="{{Name}}-{{AccountNumber}}">
                    <searchfields/>
                </field>
            </fields>
            <rowactions>
                <action type="edit"/>
                <action type="delete"/>
            </rowactions>
            <massactions usefirstitemasdefault="true">
                <action type="massupdate"/>
                <action type="massdelete"/>
            </massactions>
            <views>
                <view type="standard"/>
            </views>
        </skootable>
    </components>
    <resources>
        <labels/>
        <css/>
        <javascript/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>
Photo of Nepz Solutions

Nepz Solutions

  • 442 Points 250 badge 2x thumb

Posted 2 years ago

  • 2
Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
I've seen this come up before, and found this thread:
https://community.skuid.com/skuid/topics/ui-field-conditions

Basically, UI fields shouldn't be used as model conditions.  You could create a formula field on your Opp object that grabs the first 10 letters and use that instead on your 2nd model condition.
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 16,856 Points 10k badge 2x thumb
Nepolean,

Did Chandra V solve your problem?
Photo of Nepz Solutions

Nepz Solutions

  • 442 Points 250 badge 2x thumb
No Stephen.. My question was not answered. I think it's been misunderstood.

I'm not asking about using a UI-Only field for conditions. As i can understand, its not possible as the conditions will be converted directly to SOQL which doesn't know anything about UI only field.

But, my question is that why can't a Model have a condition whose value is based on UI-Only field on another Model. For example, please use my Page XML posted in my earlier post.