Skip to main content
Nintex Community Menu Bar
Question

Selecting required for a field and rendering conditions are not working

  • July 11, 2024
  • 2 replies
  • 0 views
  • Translate

Forum|alt.badge.img+3

Use Case : I want a field to be required if user with specific profile is trying to create a new record. I added rendering condition to for the field and I have required.

This field is throwing an error when the user not specified in the rendering condition tries to create a new record.

How can I make this work?

Did this topic help you find an answer to your question?

2 replies

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

Hi Jaiti,

One option is to set up two copies of your field to the field editor or table, and click on one in your field editor or table, and make it ‘required.’ Then, only render that version of the field for profiles that MUST fill out this field, and render the other version for profiles that are not any of the above. I’ve tried this out and it seems to be behaving as expected.

I’ve set up an example page to demonstrate, with the page’s XML below. Let me know if this helps!


<skuidpage unsavedchangeswarning="yes" personalizationmode="server" showsidebar="true" useviewportmeta="true" showheader="true">
    <models>
        <model limit="20" query="true" createrowifnonefound="true" datasource="Ui-Only" processonclient="true" id="UI-Model">
            <fields>
                <field id="MyField" displaytype="TEXT" label="MyField"/>
                <field displaytype="BOOLEAN" id="MakeMyFieldRequired" label="Make MyField Required?" ogdisplaytype="TEXT"/>
            </fields>
            <conditions/>
            <actions/>
        </model>
    </models>
    <components>
        <basicfieldeditor showheader="true" showsavecancel="true" showerrorsinline="true" model="UI-Model" uniqueid="sk-38Aj-443" mode="edit">
            <columns>
                <column width="100%" uniqueid="sk-38Aj-439">
                    <sections>
                        <section title="Section A" uniqueid="sk-38Aj-440" collapsible="no">
                            <fields>
                                <field uniqueid="sk-38Aj-445" id="MakeMyFieldRequired">
                                    <renderconditions logictype="and" onhidedatabehavior="keep"/>
                                    <enableconditions/>
                                    <label>Check this box to make "MyField" required</label>
                                </field>
                                <field uniqueid="sk-38Aj-444" id="MyField" required="true">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" operator="=" enclosevalueinquotes="false" fieldmodel="UI-Model" sourcetype="fieldvalue" field="MakeMyFieldRequired" value="true"/>
                                    </renderconditions>
                                    <enableconditions/>
                                </field>
                                <field uniqueid="sk-38Aq-481" id="MyField">
                                    <renderconditions logictype="and" onhidedatabehavior="keep">
                                        <rendercondition type="fieldvalue" operator="!=" enclosevalueinquotes="false" fieldmodel="UI-Model" sourcetype="fieldvalue" field="MakeMyFieldRequired" value="true"/>
                                    </renderconditions>
                                    <enableconditions logictype="and"/>
                                </field>
                            </fields>
                        </section>
                    </sections>
                </column>
            </columns>
        </basicfieldeditor>
    </components>
    <resources>
        <labels/>
        <javascript/>
        <css/>
        <actionsequences uniqueid="sk-38AV-259"/>
    </resources>
    <styles>
        <styleitem type="background" bgtype="none"/>
    </styles>
</skuidpage>
Translate

Forum|alt.badge.img+3
  • Author
  • 13 replies
  • July 11, 2024

Hi Mark,
I did try this approach of using the same field twice and adding the profile criteria for visibility but this does not seem to work.

Translate

Reply


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