HELP
 / 
Deep Dive
 / 
Conditional display of sections

Conditional display of sections

This is some text inside of a div block.

If you want to display a section of your Clappia app based on certain conditions, you can do that using this feature.

Here we are taking an example of an employee management app for full-time employees and contractors. If the type of employee is full-time, you want to show a section which takes the employee's joining date and if the type of employee is a contractor, you want to show a section which takes the joining date and the planned exit date.

Here are the steps:

The employee on-boarding app will be used to enter the details of employees based on Full Time and Contract based employment.

Full Time

The type of employment will be full time. Upon selecting the option notice that another section of Full Time will be opened.

This is achieved by inserting a simple formula:

In the Edit App mode, select the Full Time section. Under the Show advanced options go to Display this section if field.

Now type '@' and select the Type of Employment variable and write: ='Full Time'.

This means that when the type of employment is Full Time then the Full Time section will be displayed.

In the Full Time section, when the Employee ID is entered subsequently the Employee Bank Details Field is displayed. The logic remains same. We will see the formula for this at the end of this article.

Contract Based

The type of employment will be Contract. Upon selecting the option notice that another section of Contract will be opened.

This is achieved by inserting a simple formula:

In the Edit App mode, select the Contract section. Under the Show advanced options go to Display this section if field.

Now type '@' and select the Type of Employment variable and write: ='Contract'.

This means that when the type of employment is Contract then the Contract section will be displayed.

In the Contract section, when the Employee ID is entered subsequently the Employee Bank Details Field is displayed. The logic remains same. We will see the formula for this at the end of this article.

Employee Bank Details

This is achieved by inserting a simple formula:

In the Edit App mode, select the Employee Bank Details section. Under the Show advanced options go to Display this section if field.

Now write the following formula: OR(@employee id of full time section <>'',@employee id of contract section<>'')

This means when the employee ID is entered the employee banking details section will displayed, be it for full time or contract based.

Additional Examples

  1. If a section needs to be displayed if a field with variable name "field_one" is not empty, use the expression =(field_one <> "").
  2. If a section needs to be displayed if a field with variable name "field_one" has a value "ABC" and if another field with variable name "field_two" has a value 1000., use the expression =(AND(field_one = "ABC", field_two = 1000)).
  3. If a section needs to be displayed if a field with variable name "field_one" is not empty and if another field with variable name "field_two" is either less than 100 or greater than 100, use the expression =(AND(field_one <> "", OR(field_two < 100, field_two > 1000)))

Following are reference guides to relevant functions in Excel.