How do I display a section based on a random choice selected e.g

Hi, guys. My name is Bernard Logonia from Ghana.
I have a challenge in developing a form such that, based on a random number, section A or B displays first before the other. In this survey, some participants may start section B before answering section A and others vice versa.

How do you control the various sections based on an option selected?

I am still learning to program using ODK. Can anybody help me out with this?

I have tried several times, but nothing positive.
Form.xlsx (16.1 KB)

Hi @Logonia
You need to calculate random number between 1-2:
round(random() * 2 + 0.5, 0)
and make section 1 relevant if your random number is 1 and section 2 if it's 2.
Sample form:
RandomSection.xlsx (5.4 KB)

Thank you for the quick response. I think i did not explain well my problem. I have a form with 2 sections (Section A and Section B). The arrangement is such that section A comes before section B. I want a way i can display section B which is below section A when you select option 2 from a single select question below answering section A which is above Section B.

e.g Select_one section
Section A
Section B

begin_group Section A

begin_group Section B

How do i program such that one can answer section B before answering section A?

So you always want to display both sections but the order should depend on the answer from select_one question?

No, please. Just one section at a time. My problem is how to display section B before section A without repeating section A below section B.

So just replace the calculation (row 2) with select_one question with answers (1, 2) and it should work. If you select option 1 (represented by 1) section 1 will be displayed, otherwise section B.