0

I have downloaded the demo application, and am trying to modify the EditParty.xml file included in SimpleScreens to also include the Facility name corresponding to the ownerPartyId. I have modified the file accordingly, and it is not working, leaving me with a blank container box. Any help will be greatly appreciated, thank you so much!

<section name="PartyFacilitySection">
            <actions>
                <entity-find entity-name="mantle.facility.Facility" list="partyFacilityList">
                    <econdition field-name="ownerPartyId"/></entity-find>
                <set field="facilityIds" from="partyFacilityList.facilityId"/>
                <set field="facilityNames" from="partyFacilityList.facilityName"/>
            </actions>
            <widgets>
                <container-box>
                    <box-header><label text="Facilities" type="h5"/></box-header>
                    <box-toolbar>

                    </box-toolbar>
                    <box-body>
                        <form-list name="FacilitiesForm" list="partyFacilityList">
                            <row-actions>
                                <entity-find entity-name="mantle.facility.Facility" list="plantList">
                                    <econdition field-name="ownerPartyId" operator="equals" value="84"/>
                                    <econdition field-name="facilityName"/></entity-find>
                            </row-actions>
                            <field name="ownerPartyId"><default-field><hidden/></default-field></field>
                            <field name="facilityName"><default-field title="Name">
                                <display-entity entity-name="mantle.facility.Facility"/>
                            </default-field></field>
                            <field name="facilityName"><default-field><text-line size="20"/>

                            </default-field></field>
                        </form-list>
                    </box-body>
                </container-box>
            </widgets>
        </section>
  • Your question is very unclear. If you want attention and user input you need to provide more context to the question, expected result and/or desired behavior. Welcome to SO. – Chisko Jun 21 '17 at 21:46
  • This is a 'please debug my code' sort of question, but I'll answer briefly: you have to field elements in your form-list with the name 'facilityName' and the second will override the first. That is why you're seeing a text-line instead of the display-entity. That said, the display-entity and the row-actions make no sense, you'll already have the full Facility records from the entity-find to get partyFacilityList so no need to do additional queries in form-list.row-actions or use display-entity which also results in a query for the record you already have. Just use the display element. – David E. Jones Jun 22 '17 at 01:20
  • @DavidE.Jones Thank you for your time, that helped me figure it out. Problem solved! – Alex Bradau Jun 22 '17 at 18:22

0 Answers0