Display text box depending on variable contents

stevie-martin Community Member Posts: 5
Hi all,

OK i'm hoping you can help. I've created an interaction that displays content depending on the contents of a variable. However the variable can sometimes contain the number "1" or the number "10" and i'm having difficultly showing the correct content. Basically is there a way to check against a string of characters in a variable and not just the separate characters.

i.e. can i check that the value of the variable contains the character string to "10".

Hope that makes sense, any help is much appreciated.


  • wheels
    wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 685 eLearning ROCKSTAR Admin Team

    If you are doing an Equal To relationship then it would see 10 different than 1, and you do say string compare, so I'm guessing you are accumulating things in a variable and then testing against it.

    Typically people put in a known delimiter, so if you are going to add 1 then instead add ;1;

    Then in your condition check for Contains ;1; or ;10;

    You can also test before adding in the value into your variable so it doesn't become bloated. So, add to variable ;1; if variable does not contain ;1;

    Hope this helps!