Trigger certain blocks to appear based off date embedded data | XM Community
Skip to main content

Hi Community - I'm trying to have a certain blocks appear based on the current date (and in turn, have all the other blocks not appear) in a survey. For example, I want the December 2021 block to appear (and only the December 2021 block) when participants take the survey now (in December 2021). Subsequently, when its January 2022, I will have a January 2022 block that I want to appear instead of December 2021. However, in my example below, the block that appears when I take the survey seems is the next block that comes in the survey order: August 2021. Am I doing something wrong with the embedded data? Have I entered it incorrectly?
*Note in my screenshot, I tried 2 different methods. The branch triggering the November 2021 block (I just threw it in there for this test) is from this previous thread (https://community.qualtrics.com/XMcommunity/discussion/1412/display-or-hide-a-block-based-on-date-parameters#) and the other is just from me testing it out.
Thank you!
embedded data top.JPG
date coding for block attemps.JPG

Try yyyy-mm-dd format. I know that's the format that's required when importing data, so maybe that's the format they want when doing branching.


Thank you so much! I never would have guessed it would have been something so small yet significant as that. It worked when the the branching box was formatted with yyyy-mm-dd and the embedded data value was "${date://CurrentDate/Y}${date://CurrentDate/m}${date://CurrentDate/d}" , which was "TODAY2" in my example.
Thanks again!
-Mars


Also found out that the solution above does not work when the embedded data variable is called "TODAY" (FYI for anyone out there looking at this. Still could not have done it without InessaG 's help!). "TODAY2" worked fine.


Leave a Reply