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.
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.
Comments
-
wheels Community Member, Administrator, Moderator, Rockstar Manager Posts: 685 eLearning ROCKSTAR Admin TeamHi,
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!
Categories
- 35.9K All Categories
- 109 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 29K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 25 ELB Learning Content
- 25 ELB Learning Content Discussions
- 329 CenarioVR®
- 196 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 42 Rockstar Learning Platform®
- 39 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 7 The Training Arcade®
- 7 The Training Arcade Discussions
- 936 All Things eLearning
- 37 eLearning Development
- 546 Learning Management System (LMS) Integration
- 333 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products