"If hidden, Model field changes should be cancelled" not working on new record

and thoroughand thorough Member
edited March 2018 in Problems
I replied here, but just noticed that post is marked solved and I am still having the issue on version 11.1.6.  I created a simple test page (XML below) to show this using a model based on the Account object that creates a new record.  When Type=Other, the Description field shows; otherwise it's hidden.  However, if the user types a value into Description, then selects a Type besides Other, whatever was entered into Description is retained in the model (see below image).  This is a contrived example, but there are many cases when a user changes an entry before saving that invalidates the values of conditionally hidden fields, so those fields should revert to null (or whatever their initial value was when the new record/row was added, e.g., default values).

Cancel-changes-if-hidden does work on existing database records from what I can tell; my issue only applies to new/unsaved records.

<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
        <model id="testAccount" limit="1" query="false" createrowifnonefound="true" datasource="salesforce" sobject="Account">
                <field id="Type"/>
                <field id="Description"/>
        <basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="testAccount" uniqueid="sk-mBb-305" mode="edit">
                <column width="100%">
                        <section title="Section A" collapsible="no" showheader="false">
                                <field uniqueid="sk-mBb-358" id="Type"/>
                                <field uniqueid="sk-mBb-359" id="Description">
                                    <renderconditions logictype="and" onhidedatabehavior="cancel">
                                        <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="true" fieldmodel="testAccount" sourcetype="fieldvalue" field="Type" fieldtargetobjects="Account" value="Other"/>
        <actionsequences uniqueid="sk-2CZNLe-315"/>
        <styleitem type="background" bgtype="none"/>


  • Stephen SellsStephen Sells Member
    edited March 2018
    Thank you for bringing this to our attention. I have been able to reproduce what you are seeing. I've logged this as an issue and our development team is taking a look at it now. I'll respond back when a fix or workaround is provided. 
  • Richa SharmaRicha Sharma Member
    edited March 2018

    I am also having this issue. Could you please give an ETA as this functionality is very crucial for my page.

    Richa Sharma
  • Stephen SellsStephen Sells Member
    edited March 2018
    Could you provide any further clarity as to what exactly you're trying to do? The more background in how your using the page and what exactly your need is, the better speed the ETA will have.
  • Richa SharmaRicha Sharma Member
    edited March 2018
    Hello Stephen,

    Actually, I have created an edit page using conditional rendering. I have fields (which includes textbox, picklist etc.) which are rendered when there is a particular value selected on the first two picklists... Rendering is working fine... I have selected "If hidden, Model field changes should be canceled"... 

    If the field is not rendered it should not save the value of that field even if it has value.

    But its still saving it and it has defeated the actual purpose of rendering.

    Could you please guide me if I am missing anything and let me know if some tweak is required from your side.
  • Stephen SellsStephen Sells Member
    edited March 2018
    You aren't missing anything. We're working on creating a fix as soon as possible.

    I should clarify, if you could provide more insight into how you're wanting to use that functionality specifically and why, that could potentially create a higher priority I can take to my team to explain why it should be prioritized over other known issues.
  • Richa SharmaRicha Sharma Member
    edited March 2018
    Hello Stephen,

    As I have created a page where one object record should be inserted. The page has several fields but all fields should not be displayed to the user. The rendering of fields depends on the value from the two picklists If I have selected Option 1 in the first picklist and option 3 in the second one...I should show location text field to user.....This is working well...I can save this and it gets saved.

    Same case is for edit as well....

    Let's say for example I edit this record which I just created... And I select Option 1 in the first picklist and option 2 in the second picklist, now location text box is hidden and duration picklist is rendered true... If I enter a value in the duration field... it should clear the location text box value when saved....

    Hope I have cleared my query.

    Richa Sharma
Sign In or Register to comment.