Add fileds

Hi All
I have three different fields
entrant can either input in filed A or into field B or into field C
I want to create filed D equal to either field A or if field A is missing
then put in contents for filed B if B is also missing them put in contents
for field C

Any help will be much appreciated

··· -- **In sun set years education is not associated with standard of living and medical care access; it is the the financial myosin and actin!!!

**** Don't give me fish, teach me how to fish

Kayoub K
0772656158 / 0703516660
Data Manager
Mujhu Research Collaboration
Mulago Hosp
Msc Enterprise Architecture

Hi Ayoub,

This can be solved using a nested "if" condition.

I would suggest setting field D to "calculate" and under calculation column
using "if(${fieldA}=null, if(${fieldB}=null, ${fieldC}, ${fieldB}),
${fieldA})"

Then you can use ${fieldD} in subsequent code.

Note:

  • If field C is also missing then this will set field D to missing. If you
    don't want that then you should have a default value for field D (e.g. 0)
  • If you need field D to be a number (e.g. it's the area of farm) and need
    to do calculations on it later, then you need to convert that to an integer
    or decimal before using as I think the calculate field will make the result
    a string by default.

Hope this is helpful!

··· On Friday, 3 March 2017 11:51:38 UTC+3, Ayoub Kakande wrote: > > Hi All > I have three different fields > entrant can either input in filed A or into field B or into field C > I want to create filed D equal to either field A or if field A is missing > then put in contents for filed B if B is also missing them put in contents > for field C > > Any help will be much appreciated > > -- > **In sun set years education is not associated with standard of living and > medical care access; it is the the financial myosin and actin!!! > > **** Don't give me fish, teach me how to fish > > Kayoub K > 0772656158 / 0703516660 > Data Manager > Mujhu Research Collaboration > Mulago Hosp > Msc Enterprise Architecture >