# Question Activation

**URL:** <https://forum.avicennaresearch.com/t/question-activation/258>\
**Category:** Support\
**Created:** [January 7, 2021, 11:36am UTC](https://forum.avicennaresearch.com/t/question-activation/258 "2021-01-07T11:36:24Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [January 7, 2021, 11:36am UTC](https://forum.avicennaresearch.com/t/question-activation/258/1 "2021-01-07T11:36:24Z")

</div>

Hi!

It is possible to enable a question within an activity after 7-days of the study starting and only enabled for 7days total?  
Or is it preferable to create a separate activity that fire in the second week on the study overall?

Thanks

---

<div class="post-metadata">

**Author:** ![faham](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@faham](https://forum.avicennaresearch.com/u/faham)\
**Post date:** [January 7, 2021, 5:07pm UTC](https://forum.avicennaresearch.com/t/question-activation/258/2 "2021-01-07T17:07:40Z")

</div>

Hi @harrietrosegalvin,

Yes you can use [Time triggering logic](https://learn.ethicadata.com/getting-started/surveys/#time-triggered) in order to do this, no need for a separate activity.

Thanks,  
Faham

---

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [January 8, 2021, 10:36am UTC](https://forum.avicennaresearch.com/t/question-activation/258/3 "2021-01-08T10:36:31Z")

</div>

Thanks, Faham, but the link only helps with triggering for the whole survey. It is possible to program this feature using the online editor?

E.g., we want a single item (question) within the survey to appear the 4th time the survey is triggered in the day. We only want the question to appear for 7-days after 7-days of the study start. It’s quite specific. Is it only possible to do this with editing the JSON file.

---

<div class="post-metadata">

**Author:** ![faham](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@faham](https://forum.avicennaresearch.com/u/faham)\
**Post date:** [January 8, 2021, 3:40pm UTC](https://forum.avicennaresearch.com/t/question-activation/258/4 "2021-01-08T15:40:16Z")

</div>

@harrietrosegalvin I misunderstood your question sorry about that. Yes we’ve recently added a feature addressing what you need but the official documentation is not updated yet. Use `days_since_reg_date` in the criteria of questions to enable/disable those as required.

For example, if you set a questions criteria to `days_since_reg_date > 7 AND days_since_reg_date <= 14` That question will only appear between day 8th and day 14th (inclusive) after participant’s registration date.

Note that the survey’s triggering logic should trigger the survey during this time and then each question at their own level get enabled or disabled based on their criteria.

You don’t need to manually modify the JSON file, use the same criteria editing tool.

Hope this help, let us know if have any questions.

Thanks,  
Faham

---

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [January 8, 2021, 4:22pm UTC](https://forum.avicennaresearch.com/t/question-activation/258/5 "2021-01-08T16:22:38Z")

</div>

Thank you for your reply. Sorry to keep asking - but where am I enabling the question? The question isn’t dependent on another. It is just only relevant for that one week.

---

<div class="post-metadata">

**Author:** ![faham](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/f/5daacb/32.png) [@faham](https://forum.avicennaresearch.com/u/faham)\
**Post date:** [January 8, 2021, 8:59pm UTC](https://forum.avicennaresearch.com/t/question-activation/258/7 "2021-01-08T20:59:10Z")

</div>

Put the question in its own section and in the criteria field put:  
`days_since_reg_date > 7 AND days_since_reg_date <= 14`

This section would only show during that time, note to avoid putting invalid keywords such as `IF` or `THEN` as those would lead criteria evaluation error which by disables that section.

---

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [January 11, 2021, 11:33am UTC](https://forum.avicennaresearch.com/t/question-activation/258/8 "2021-01-11T11:33:29Z")

</div>

Thank you that makes sense! The question will now only appear on those days. But the next level I require is to only have the question shown on those days the third time we trigger the survey.

The EMA is randomly fired 3 times every day. But this question should only be shown at the end of the day. Is there a way to further exclude it from the previous time points.

Thanks

---

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [January 11, 2021, 11:46am UTC](https://forum.avicennaresearch.com/t/question-activation/258/9 "2021-01-11T11:46:32Z")

</div>

For example, can we add to the question criteria a time e.g., days\_since\_reg\_date \> 7 AND days\_since\_reg\_date \<= 14 AND time of day \<= 16:00

---

<div class="post-metadata">

**Author:** ![m.hashemian](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/m/a5b964/32.png) [@m.hashemian](https://forum.avicennaresearch.com/u/m.hashemian)\
**Post date:** [January 14, 2021, 10:36pm UTC](https://forum.avicennaresearch.com/t/question-activation/258/10 "2021-01-14T22:36:39Z")

</div>

Hi @harrietrosegalvin

As you guessed, you can combined the criteria to achieve this. The keyword you can use in here is this:

```auto
XXX_since_reg_YYY

```

Where `XXX` can be one of the following:

```auto
seconds
minutes
hours
days
weeks
months
years

```

And `YYY` can be one of the following:

```auto
date
time

```

So you can form your criteria such that the question is shown only in the afternoon of that date.

Hope it helps,  
Mohammad

---

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [February 3, 2021, 10:37am UTC](https://forum.avicennaresearch.com/t/question-activation/258/11 "2021-02-03T10:37:18Z")

</div>

Hi Mohammed,

Sorry, I tested this last response and it doesn’t seem to work. We ideally want our participants to register in the afternoon. But if this doesn’t happen how can this criteria be used to specify that the question will only every show after 16:00?

Thanks  
Harriet

---

<div class="post-metadata">

**Author:** ![m.hashemian](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/m/a5b964/32.png) [@m.hashemian](https://forum.avicennaresearch.com/u/m.hashemian)\
**Post date:** [February 3, 2021, 10:46am UTC](https://forum.avicennaresearch.com/t/question-activation/258/12 "2021-02-03T10:46:07Z")

</div>

Hi @harrietrosegalvin

I made a mistake in my response. The criteria should start with underscore. So it’s `_XXX_since_reg_YYY ` and not `XXX_since_reg_YYY `.

Can you please try with `_` prefix?

Thanks

---

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [February 3, 2021, 11:11am UTC](https://forum.avicennaresearch.com/t/question-activation/258/13 "2021-02-03T11:11:24Z")

</div>

Hi!,

Yes, that now worked for the date category. The question is only shown between the 7th and 14th day of participation.

But for example, as I mentioned we only want this question block to appear after 16:00 in the afternoon between those dates. Using \_hours\_since\_reg\_time works in theory as our participants should all register in the afternoon at around 16:00. But if they don’t we have an issue. Is there any way to have criteria for the time that is not associated with the registration? For example just time\_of\_day \> 16:00?

Thanks

---

<div class="post-metadata">

**Author:** ![m.hashemian](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/m/a5b964/32.png) [@m.hashemian](https://forum.avicennaresearch.com/u/m.hashemian)\
**Post date:** [February 3, 2021, 11:25am UTC](https://forum.avicennaresearch.com/t/question-activation/258/14 "2021-02-03T11:25:02Z")

</div>

But can’t you use `_hours_since_reg_date`? This always uses the mid-night of the day that the participant enrolled as the reference point. So the following:

```auto
_hours_since_reg_date >= 16 and _hours_since_reg_date < 17

```

Always refer to 4 to 5 pm on the first day of enrollment. And it seems that’s what you are looking for. Right?

---

<div class="post-metadata">

**Author:** ![harrietrosegalvin](https://forum.avicennaresearch.com/letter_avatar_proxy/v4/letter/h/c68b51/32.png) [@harrietrosegalvin](https://forum.avicennaresearch.com/u/harrietrosegalvin)\
**Post date:** [February 3, 2021, 11:27am UTC](https://forum.avicennaresearch.com/t/question-activation/258/15 "2021-02-03T11:27:50Z")

</div>

Ahh, I see! I wasn’t aware by doing that it would take the mid-night point and then add the hours from there! This is perfect. Thank you for your patience and help!

Best,  
Harriet
