Setting Up Custom Display Logic | XM Community
Skip to main content
Hello,



I need to display one of two messages, "continue" or "stop", depending on the current loop number vs total loop count. So if current# is less than total loop# then display "continue", else if current# = total#, then display "stop".
I would do this using two Embedded Data fields and math operations. At the beginning, set them both to zero, then use operations to add number based on whatever criteria you choose. Then use branching logic to check if your CurrentNumber is more than TotalLoopNumber then end the survey, otherwise keep them going through.



Hope that makes sense but if not, feel free to tag me in a follow-up question!
Hi @jpardicusick,



Thank you so much for your reply, I wouldn't have been able to figure out a solution so quickly without your suggestions. After looking further into math operations and embedded data I came up with a different solution. I made one embedded data field in the survey flow called "loop countdown"= $e{{$lm://TotalLoops} - ${lm://CurrentLoopNumber}}.



In my question block I have one text entry question saying "Please continue task", with display logic set to: loop countdown is greater than 0, and a second text entry question saying "Please start next task", with display logic set to: Q(Please continue task) is not displayed.



Everything seems to be working fine so far, I'll post an update if this solution breaks.
@Katmo Great to hear that it was helpful! Sounds like an elegant solution you've come up with.

Leave a Reply