Conditional routine based on ExpInfo

Before the experiment starts the experiment info dialog asks the participants’ number and the condition they are in (either 1 or 2). I want to have a condition for a routine, that displays a slider, but only when the condition is equal to 2.
Can someone help me? Thank you in advance!

Add the following in a Begin Routine tab of the slider routine

if expInfo['condition'] != '2':

Thank you very much! Your solution works perfectly.