Hi,

This function would be complementing function to idm:contains. My argument for the request is when a code list attribute needs to be checked e.g. to define relevancy of an other attribute this function could significantly reduce the length of the expression in certain cases.

E.g. codes are running from 1 to 10 and relevancy would be true if say codes are one of 2,4,6,9. In R the expression would look like code_list_a%in%c(2,4,6,9). In Collect, to my understanding, I have to write code_list_a = 2 or code_list_a = 4 ....

Please let me know if I have missed some new feature and this is already possible.

I really think this would be a nice improvement, but I know how busy you guys are. Congrats on version 4, I've just started to use it to create a field survey :)

Thanks!

asked 20 May '21, 07:41

Andras's gravatar image

Andras
18481952
accept rate: 0%


Dear Andras,
Sorry for the late reply.
In Collect there is a function you can use in this case: idm:contains
It takes 2 arguments: a list of values and the value you want to test.
As list of values you can specify an array of fixed values or the name of a multiple code attribute or a "node set", for example multiple_entity_name/code_attribute_name.
In your case the expression would be something like this: idm:contains(idm:array(2,4,6,9), code_list_a)
Thanks,
Open Foris Team

permanent link

answered 04 Jun '21, 09:23

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

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

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 May '21, 07:41

question was seen: 915 times

last updated: 04 Jun '21, 09:23