Hello, could you help me with this little problem?

I have a multiple seleccion dropdown list and a table in my survey, then I like to create many rows as selected items from the dropdown list and past the values as well as past the values the corresponding values in each row.

Is that possible? Let me know if it's.

Thaks a lot.

asked 20 Oct '22, 22:20

MagnunStalin's gravatar image

MagnunStalin
112
accept rate: 0%


Dear user,
The solution is a bit tricky but it's an interesting case to discuss here.
One thing that you could use is the option Auto generate minimum items that you have in the multiple entity definition editor in the Survey Designer; this option works only the first time an entity (or a form containing that) becomes relevant, so you will have to have some condition that will be triggered when all the values of your multiple selection dropdown list are filled.
Also, in the multiple entity you will have to specify the minimum number of items.
Suppose that your multiple attribute is called mult_attr, the expression in Min count will be: count(mult_attr).
Then, you have to define a calculated attribute inside the multiple entity, or an attribute with a default value specified, that takes one of the values of mult_attr as value.
The expression in that calculated attribute will be: parent()/mult_attr[idm:position($context)]
That expression takes a value from mult_attr, using the position of the current row in the multiple entity with the expression idm:position($context).
Here you can find a simple survey with an example of a table with predefined rows

Let us know, many thanks.
Open Foris Team

permanent link

answered 24 Oct '22, 14:12

Stefano%20%28OF%29's gravatar image

Stefano (OF) ♦♦
4.6k19
accept rate: 20%

edited 24 Oct '22, 14:12

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×493

question asked: 20 Oct '22, 22:20

question was seen: 394 times

last updated: 24 Oct '22, 14:12