How can I create a setting to have only a specific number of selections for a ConfiForms survey?

Nicholas Green November 17, 2021

Essentially I am using ConfiForms to make surveys for my project. The ask, requires a certain number limit of selections.

Ex: What is your favorite food? (Select 1)

[] Pizza

[]Hamburger

[]Chicken Wings

[]Hot Dogs

2 answers

0 votes
Jonathan Saldarriag August 8, 2024

Hi, I am trying to fix a value to 6 instead of more or less. I need to restrict the field exactly at 6 characters, in my case numbers. I tried using the validation rule in the field definition itself and also tried adding a rule as it is shown on the link your shared.

I tried using this expressions already but still gives me error:

CostCenterID.asLength:==6

CostCenterID.asLength:=6

CostCenterID.asLength:6

CostCenterID.asLength=6

CostCenterID.asLength==6

Does it makes a difference if I type that in the field definition itself without adding the rule?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 9, 2024

Validation Rules ConfiForms Field Definition Rule with a condition set to

!CostCenterID.asLength:6

Because, you need to define the "error" condition for your form's data and react on that

Alex

Like Jonathan Saldarriag likes this
Jonathan Saldarriag August 9, 2024

Perfect, it worked.

0 votes
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2021

Hi

You can add a validation for the field to check for it's length

https://wiki.vertuna.com/display/TEST/Limiting+characters+count+in+a+field

Same asLength function returns the number of items selected for multi-value field (in the example it checks for field length, as field is a simple text)

Alex

Nicholas Green November 17, 2021

Thank you @Alex Medved _ConfiForms_ 

Would you be able to provide me with what syntax I would use in the case of multi-select fields? 

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2021

I mean, it is literally the same

mymultifield.asLength:>2

Will trigger when more than 2 options selected

Alex

Like Nicholas Green likes this
Jonathan Saldarriag August 8, 2024

Sorry, I wanted to replied here instead of the general so you can get notified. See question above.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events