Dependency Graph

Dependency Graph
related to related to child of child of duplicate of duplicate of

View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
08571Feature requestsSurvey editingpublic2014-07-01 09:14
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynormalSeverityfeature 
Status closedResolutionduplicate 
Summary08571: EM function : array_unique
Description

Sometyimes, some user need to count different answer. It can be done with EM (see lss file). But i think it's more easy with a array_unique() function.

Then we can use
array_unique(self) in "Question validation equation " and/or array_unique(that.QQ) > 2 in condition

Additional Information

Thomas : lst time, you give me another idea. Maybe here it's not needed.
If you think it can be intersting reassign it to me.

You see the Expression with only 4 sub question. Sometimes we need it with 15 or more subquestion.
And sometimes : use it with different question.

TagsNo tags attached.
Attached Files
limesurvey_group_45.lsg (20,828 bytes)
Bug heat4
Story point estimate
Users affected %

Relationships

related to 08348 new Need some array function in EM 

Activities

DenisChenu

DenisChenu

2014-01-21 12:44

developer   ~28041

Actually use this:
{sum(
(!is_empty(QQ_SQ001)),
(!is_empty(QQ_SQ002) and QQ_SQ002!=QQ_SQ001),
(!is_empty(QQ_SQ003) and QQ_SQ003!=QQ_SQ001 and QQ_SQ003!=QQ_SQ002),
(!is_empty(QQ_SQ004) and QQ_SQ004!=QQ_SQ001 and QQ_SQ004!=QQ_SQ002 and QQ_SQ004!=QQ_SQ003),
0)}

DenisChenu

DenisChenu

2014-02-21 11:15

developer   ~28854

Thomas : another good idea ?

If not : If you think it can be intersting reassign it to me.

TMSWhite

TMSWhite

2014-03-22 16:57

reporter   ~29503

Denis-

Belatedly, there is already a unique() function in EM. Per the description, "Returns true if all non-empty responses are unique"

So, you can mix this with the array column and/or row selection syntax in self or that to determine whether all non-empty values in that row or column are unique.

The attached group demonstrates three ways you can do this. I had hoped that the sub-question relevance would color code the rows and/or columns with problems, but they just turn everything pink.

TMSWhite

TMSWhite

2014-03-22 16:59

reporter   ~29504

So, you can close this ticket -- the functionality is already supported.

DenisChenu

DenisChenu

2014-03-22 17:21

developer   ~29505

But , il already used unique(self) in ranking ! Why I put this one then ????

Oups, i think it's most for a really array unique system, (Removes duplicate values from an array).
Close this one ...

DenisChenu

DenisChenu

2014-06-19 10:55

developer   ~30179

Have it :

I want to show all text checked in a multi question list, but with and, not ,.

list(MULTI.shown) show Sub-Question1,Sub-question3

concat(" and ",MULTI.shown) show Sub-Question1 and and Sub-question3

Something like array_filter
concat(" and ",array_filter(MULTI.shown)) can do the trick

OR:
concat(" and ",array_filter(MULTI.shown,trim)) (allow calable function, not only false

Issue History

Date Modified Username Field Change
2014-01-21 12:43 DenisChenu New Issue
2014-01-21 12:43 DenisChenu Status new => assigned
2014-01-21 12:43 DenisChenu Assigned To => TMSWhite
2014-01-21 12:43 DenisChenu File Added: limesurvey_survey_array_unique.lss
2014-01-21 12:44 DenisChenu Note Added: 28041
2014-02-21 11:15 DenisChenu Note Added: 28854
2014-03-22 16:57 TMSWhite Note Added: 29503
2014-03-22 16:58 TMSWhite File Added: limesurvey_group_45.lsg
2014-03-22 16:59 TMSWhite Note Added: 29504
2014-03-22 17:21 DenisChenu Note Added: 29505
2014-03-22 17:22 DenisChenu Status assigned => closed
2014-03-22 17:22 DenisChenu Assigned To TMSWhite =>
2014-03-22 17:22 DenisChenu Resolution open => no change required
2014-03-22 17:22 DenisChenu Fixed in Version => 2.05+
2014-06-19 10:55 DenisChenu Note Added: 30179
2014-06-19 10:55 DenisChenu Status closed => feedback
2014-06-19 10:55 DenisChenu Resolution no change required => reopened
2014-07-01 09:13 DenisChenu Relationship added related to 08348
2014-07-01 09:14 DenisChenu Status feedback => closed
2014-07-01 09:14 DenisChenu Assigned To => DenisChenu
2014-07-01 09:14 DenisChenu Resolution reopened => duplicate
2019-11-01 17:25 c_schmitz Category Survey design => Survey editing