Dynamically Hide/Show Fields Below Based on Value Edits

  • 14 August 2018
  • 7 replies
  • 328 views

Badge +2

I'm using Ninex 2010 for the moment.  I know how to hide/show a field using the appearance setting based on another field's value, but it only seems to evaluate when the form is first loaded.  Changing the trigger field's value after the form has been loaded has no effect on the secondary field's visibility.

So here's the ask.  Is it possible to program a field to dynamically show based on a CHANGING radio button in another field?

This behavior is similar to a survey where selecting Yes or No changes what questions are displayed below, dynamically.

Thanks in advance for any help, even if it is to say Nintex can't do this!

TJ


7 replies

Userlevel 5
Badge +14

yes, that's exactly how appearance settings work.

you have to rather create a formatting rule to show/hide a control based on other control's value

Badge +2

Thanks Marian, that's what I expected, but it only seems to work based on the trigger control's value coming into the form, not as I change the form's value while in edit mode.  Perhaps I'm setting it up wrong.  How should I do it?

Badge +7

Perhaps you can give a little more detail as to exactly what you're trying to accomplish. Can you post screenshots and examples? 

If you're simply trying to show or hide a control/field based on the value of another field, you can create a rule (there's an Add Rule button in the ribbon when you click the control).

218199_pastedImage_2.png

Badge +2

Some of my confusion was with what is done with the "Rules" display on the right, vs. right clicking on a Panel control, selecting Settings, Appearance, Visible (expression here).  Since I have never done this before, finding the object settings first really threw me off.  The settings spot only evaluates when the form loads, or so it seems, which was driving me batty!   Now I understand.  I have to use the Rules for things to work dynamically during form edits.

I successfully used a T/F button and a Text Box value to control the visibility of other objects, dynamically during form use, so phew, got that one.  For any newbies like me reading this, the syntax to show something in a rule can be found in this video on youtube https://www.youtube.com/watch?v=UYHXJpNT_04.  Only 3.5 minutes or so, and at least I knew what "normal" looks like!

I still have this question:

I have a 4 option radio button selection.  How do I write a rule that only shows the target item when the first option is selected?  Do I test for text, or index position, and what does the rule look like?

Thanks for answering!!!

TJ

Badge +7

For radio buttons, you should only need to test for the text value like this:

218201_pastedImage_1.png

I've named my Choice field 'options' and am testing for when it's == to "Option 2". I've applied the rule to the label so that it will hide the label when I select Option 2.

Something else selected:

218202_pastedImage_2.png

Option 2 selected:

218203_pastedImage_3.png

Badge +2

Many thanks Chad.  I was able to get everything working that I needed to.  As my father in law used to say, now "I'm cooking with gas."  In Nintex I saw some sites where a single quote was used instead of the double quote.  Are both valid?  Is there a functional difference if they are?

Badge +7

I'm happy to help.

In this case, single vs double won't matter. It will come into play when you're trying to pass quotes into a string. You can either escape the quotes using a , or you can start the string with one type of quotation and pass through the other one.

Example: "<a href='www.google.com'>Google</a>" 

See how I'm including the single quotes around the URL in the overall string? 

If we've covered all your questions, please mark the correct post as answered.

Reply