Dear colleagues,

I have a technical question. I am working in setting a CE survey in Collect. I have created an multiple entity (1:N) being the key attribute the cover (forest, non forest, no data) and the the secondary attribute the % (10 classes from 10 to 100%).

I would like to add a rule that limits that the sum of the three is higher than 100%. Is there a way to do this?

Thank you beforehand and congratulations for the excellent job you are doing.

Best.

Andres.

asked 21 Nov '17, 09:17

abespejo's gravatar image

abespejo
1529
accept rate: 0%


Dear Andres,
You could follow this steps: - define a calculated attribute to calculate the sum of all the percentage cover (define it at the same level of your multiple entity and call it 'total_cover' for example) - the type of this attribute must be Number - add a new Calculated Value Expression and write this in the expression input field: sum(MULTIPLE_ENTITY_NAME/COVERAGE_ATTR_NAME) (replace MULTIPLE_ENTITY_NAME and COVERAGE_ATTR_NAME with the right entity and attribute names)
- define a Custom validation rule in the attribute with the percentage inside the multiple entity
- write this expression: parent()/total_cover <= 100

Whenever the total coverage exceeds 100%, the user will have an error message in every coverage input field.
Many thanks,
Open Foris Team

permanent link

answered 21 Nov '17, 10:17

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: 21 Nov '17, 09:17

question was seen: 1,911 times

last updated: 21 Nov '17, 10:17