Select to view content in your preferred language

Disable Questions if one or the other is selected

106
6
Jump to solution
Tuesday
SueBoelk2
Occasional Contributor

Help please!

Enclosed is a form with an inspection of a dairy.

Most of it works quite well however we need to help the user avoid inadvertently clicking an unwanted choice.

Problem @ #15: 

Background:

The inspector has the discretion to charge either a 2 point deduction or a 5 point deduction depending upon the severity of the violation (that is the reason for there being 2 categories with the same violations but different point deductions.) The inspector must choose one violation (either one 2 point violation or one 5 point violation).

Needed result:

If there is one 2-point deduction, then 5 and 7 point deductions will be grayed out.

If there is one 5-point deduction, then 2 and 7 point deductions will be grayed out.

No problem, this is working: If there is a 7-point deduction, then 2 and 5 point deductions are grayed out.

I am beginning to learn conditional expressions but am not there yet.

Any help is appreciated.

 

 

0 Kudos
1 Solution

Accepted Solutions
DeonLengton
Esri Regular Contributor

Hi Sue

You can simply use the count-selected to check if the 2-point or 5-point deduction was done and then make the other deduction read only

For instance - the group 15. -2 pts Drug and Chemical Control -2 points 
make this readonly if  count-selected(${protection3_issues})>0

Then for group 15. -5 pts Drug and Chemical Control -5 points

make this readonly if count-selected(${protection2_issues})>0

DeonLengton_1-1759915988358.png

 

View solution in original post

0 Kudos
6 Replies
DeonLengton
Esri Regular Contributor

Hi Sue

You can simply use the count-selected to check if the 2-point or 5-point deduction was done and then make the other deduction read only

For instance - the group 15. -2 pts Drug and Chemical Control -2 points 
make this readonly if  count-selected(${protection3_issues})>0

Then for group 15. -5 pts Drug and Chemical Control -5 points

make this readonly if count-selected(${protection2_issues})>0

DeonLengton_1-1759915988358.png

 

0 Kudos
SueBoelk2
Occasional Contributor

Thank you Deon! Will work on implementing this solution!

0 Kudos
Neal_t_k
Frequent Contributor

I am not sure in the format you have that this will work as you explained.  When testing with @DeonLengton's suggestion,  it needs an 'or' to to trigger for the 3 questions scenario.  I kept getting a cyclic dependency error when filled in for more than one question.

Is it possible to add a prior question with relevancy for those three groups.  This would solve the cyclic dependency.  See attached for example

0 Kudos
DeonLengton
Esri Regular Contributor

Hi Neal

Yes if you try to do the readonly setting on the multiple choice fields then you will get a cyclic dependency error. That is why i put the readonly setting on the groups - not on the multiple choice fields.

Hope that helps

0 Kudos
Neal_t_k
Frequent Contributor

@DeonLengton good call, I missed that in your explanation.  You still do need an 'or' but using it on the groups works.

Neal_t_k_0-1760016725848.png

I would still suggest considering the solution with relevancy I supplied above.  You could do a note question that explains the options prior to the type selection.  The benefit of this solution would be then you are not showing them non-relevant information and shortening the form.  

 

0 Kudos
SueBoelk2
Occasional Contributor

Thank you for your help Neal- good to know about the cyclic dependency and why it was appearing. Thanks again for the Example!