Issue with relevant statement - 2 questions appear, only want one based on previous answer

450
7
Jump to solution
05-16-2023 06:27 AM
dwold
by
Occasional Contributor II

I have the following relevant statements set up below but when certain selections are made both answer options are available. I only want one based on the value of a previous statement. What am I doing wrong? I've selected Unemployment which is over 1000 but the question for under 1000 also appears.

dwold_0-1684243442543.png

dwold_1-1684243514164.png

I've tried both:

${target_set} > 1000 or ${un_target_set} > 1000

(${target_set} > 1000) or (${un_target_set} > 1000)

 

0 Kudos
1 Solution

Accepted Solutions
DougBrowning
MVP Esteemed Contributor

Yes just like I thought a calculate defualts to string.  Set the bind::type to int on those and that should do it.

The other newer way to do it is to set to type integer then use the hidden apperance.

View solution in original post

7 Replies
jcarlson
MVP Esteemed Contributor

If you want only one question to show up consistently, you need conditions that don't overlap at all. Will there ever be answers to both target_set and un_target_set?

- Josh Carlson
Kendall County GIS
dwold
by
Occasional Contributor II

@jcarlson It will be one or the other. target_set and un_target_set are pulling values from different csv files but all un_target_set values are > 1000 so I want the user to enter in a % when that is the case (unemployment is selected). Also, if target_set is > 1000 the user should enter a % value but not have the option for entering a value

0 Kudos
dwold
by
Occasional Contributor II

@jcarlson would it be best to split up the two relevant statements to make three? However, I am trying to not create more fields in the feature layer

type=integer name=target_value_percent relevant=${target_set} > 1000

type=integer name=target_value_numeric relevant=${target_set} < 999

type=integer name=un_target_value_percent relevant=${un_target_set} > 1000

0 Kudos
DougBrowning
MVP Esteemed Contributor

I do not see the fields target_set or un_target_set in your form at all.  Is it just not shown?  Can you post the whole form.  My guess would be those are note fields so they count as sting not int.  You can set the bind type column to int to fix that.

dwold
by
Occasional Contributor II

@DougBrowning those fields are calc fields from a csv file and then used to display a Standardized Target Statement note. Based on the value in the target statement, I want the user to enter in a either a value (<1000) or a percentage (> 1000)

dwold_0-1684245482709.png

 The action I am looking for behaves correctly when I do not have or ${un_target_set} > 1000 in the relevant field but those values (un_target_set) are all over 1000 so I want the user to enter in a percentage when they select unemployment from a previous question.

dwold_1-1684245640824.png

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

Yes just like I thought a calculate defualts to string.  Set the bind::type to int on those and that should do it.

The other newer way to do it is to set to type integer then use the hidden apperance.

dwold
by
Occasional Contributor II

I think I got it to work...might not be the best/most efficient but I added ${un_target_set} < 1000 to the second statement and that question is gone when unemployment is selected because there are no values under 1000

dwold_0-1684246777192.png

dwold_1-1684246836990.png

 

 

0 Kudos