Hi colleagues,

I would like your help on the above.

I want to sum different attributes (number attributes) e.g. total cover_1, total cover_2, in my survey, in order afterwards to create a validation rule (e.g. total cover (i.e. total cover_1+total cover_2) <=100%). Could you advice how this summing can be done?

Those attributes (total cover_1, total cover_2) are found in different tabs of the survey, and are the result of the sum of other attributes as part of multiple entities (1/N). Just to note that the sum of the respective attributes (e.g. total cover_1) has been done successfully.

Thanks in advance, itzam

asked 22 Jan '18, 10:03

itzam's gravatar image

itzam
21410
accept rate: 0%

edited 22 Jan '18, 12:13

Open%20Foris's gravatar image

Open Foris ♦♦
1.0k5714


Hi Itzam,
You can of course use other calculated attributes as source of a calculated attribute, so in general there are no problems.
Can you give us some more information about the structure of your survey? E.g. are total_cover_1 and total_cover_2 in the same level as total_cover? Are they inside some other single or multiple entities?
Many thanks,
Open Foris Team

permanent link

answered 22 Jan '18, 13:07

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

Stefano (OF) ♦♦
4.8k119
accept rate: 19%

Hi again and thanks for your prompt response,

Yes of course I can give you more info (I will try to explain as detailed as possible).

Total_cover has not been developed;

Total_cover_1 and total_cover_2 are in the same level, having the plot as a root (i.e. plot/total_cover_1, plot/total_cover_2), although appearing in different tabs. Total_cover_1, and total_cover_2 calculate the sum(using the sum function) of other attributes being part of multiple entities (1/N) (e.g. element_type_1 the total_cover_1, and element_type 2 the total_cover_2). Element_type_1 and 2 are also in the same level.

I hope this helped,

Many thanks again, itzam

permanent link

answered 22 Jan '18, 13:24

itzam's gravatar image

itzam
21410
accept rate: 0%

Hi Itzam,
Then just define total_cover using an expression like total_cover_1 + total_cover_2.
Collect will first calculate the result of total_cover_1 and total_cover_2, then it will sum up them to calculate total_cover.
Please try it and let us know, many thanks.
Open Foris Team

permanent link

answered 22 Jan '18, 13:38

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

Stefano (OF) ♦♦
4.8k119
accept rate: 19%

Yes that worked perfectly.

Thanks a lot,

itzam

permanent link

answered 22 Jan '18, 14:13

itzam's gravatar image

itzam
21410
accept rate: 0%

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:

×71

question asked: 22 Jan '18, 10:03

question was seen: 3,277 times

last updated: 22 Jan '18, 14:13