Using a Text Entry Box for an Advanced Action in a crossword puzzle. The appropriate letter for each box is set as a Literal If Statement for the TEB. When correct, the respective box turns green. When incorrect, it turns red. This works for all items except when the correct letter for the box is P or R.
Hi Captivate gurus,
I’m building a crossword puzzle for one of our courses. I have it set up with a text box on top of each square where the user can add a letter, and I have an advanced action that changes the color of the box when the user clicks “Submit” – green for correct, red for incorrect. The action currently works for everything accept for the letters R and P. I imagine there must be some other item interfering with this, but I can’t figure it out.
An example of a working Advanced Action is:
- If A1_G (the Variable of the text box) is equal to Literal G, change the state of A1_G_Space (the box) to Correct (green). Else change the state of A1_G_Space to Incorrect (red).
Meanwhile, the exact same Advanced Action for the letters P and R don’t work, as this example illustrates:
- If A1_P (Variable of text box) is equal to Literal P, change the state of A1_P_Space (the box) to Correct (green). Else change the state of A1_P_Space to Incorrect (red).
The P and R boxes always show green, even if an incorrect answer is given. For some reason the Then statement is being activated every time. I imagine it has something to do with my naming conventions or a Captivate shortcut key, but I’ve tried multiple tweaks with no luck.
Any wisdom you can share would be appreciated!
Fine that you found the solution. Maybe a tip, which I also offer during any Captivate training: set up a table for labeling. To avoid that a label is used twice (which could cause other problems), start any label with one or two characters identifying the objects. I use v_ as starters for variables, i_ for images, tx_ for text etc. Makes it easier to identify names, and to use filtering in dropdown lists.
Try to replace the literal by another user variable to which you assign the letter as a command in a first decision that is not conditional. You can reuse that variable for each action. I would also strongly recommend to use shared actions for this use case.
You must be logged in to post a comment.