Add Maximum or Minimum Requirement | XM Community
Skip to main content

Hello,

I have a Text Entry Question and would like to add a Min & Max Requirement.

 

However, I have four values for the requirement of which it should either be the lowest or highest that is taken as the reference value. So I would like to enter four Piped Text fields of which either the lowest or highest value should be taken as the requirement. 

 

Is that possible?

 

Thank you very much in advance.

Hi @anleta ,

If Text entry will take values as Number  then you can set conditions as below:
 

If Text entry will take values as Text  then you can set conditions as below:
 


can you further elaborate on below :

 I would like to enter four Piped Text fields of which either the lowest or highest value should be taken as the requirement. 

 

 

Hope it resolves your query😊!!


Hi @anleta  ,
If my assumptions are correct, you are getting 4 piped values from previous questions .
Now , you want to analyze those 4 variables and choose max and low value among them.
After doing this you want o set the range of this text input based on above max and low value.
If this is your requirement , then you can follow below methods:
 

 I have assumed mine four piped data as pipe1, pipe2, pipe3 and pipe4.
I have created two new variable max and low.

Using conditions which checks for each pipe 1 to 4 and sets the value of max accordingly.
​​​​​​


Similarly, I have done for the low value also.

All these condition must be placed before the block in which present TextEntry question is present .
 Then , you can set the Custom Validation  on this question as shown in below screenshot.

Hope this resolves your query😊!!


Thank you so very much for your detailed response! I am sorry, I should have specified this before: The answer fields & values that shall be compared with each other are in the same block. There is a loop within the block, so I cannot separate this into another one. Basically for every value entered or shown in the loop this comparison shall take place. It it then also possible?


Hi @anleta ,

It may be possible , but I will need to see the survey structure then I will be in better position to answer.

The issue with embedded data is that it only gets updated if its next button is clicked (based on condition)or it is updated before the block in the survey.
Otherwise you will have to use custom  JS.

Hope this resolves your query😊!!


Leave a Reply