VAR(Assesment_Score)

mnotermans5114
mnotermans5114 Community Member Posts: 916
Working on a title in Lectora 16.2.2 i notice this behaviour.

I have several assesments/tests in a title.

-Assesment1
-Assesment2
-Assesment3

At some point i show the score(s) achieved in those assesments by calling the variable(s).
- ChangeContents -> Set Text -> Var(Assesment1_Score)

This all works perfect.
If i now change the title of any of my assesments... eg.
-Assesment1
-Assesment2A
-Assesment3
The variables change along accordingly...almost everything internally changes along with the namechange of my test.. except......

My ChangeContents action... i have to walk through the title and manually replace everywhere i used Var(Assesment2_Score) to Var(Assesment2A_Score)

So i am not sure whether this is still the same in Lectora 17. But wouldn't it be nice if any action calling a specific variable would change too automatically when changing that....

Regards,
Math

Comments

  • jvalley4735
    jvalley4735 Community Member Posts: 1,357
    I've brought your suggestion to the development teams attention.  Thanks!
  • dfleary
    dfleary Community Member Posts: 82 ☆ Roadie ☆
    The reason this occurs is that when we introduced the convenience of in-line variable replacement - so that you can put a variable into a text string, such as "Hello, VAR(Name)"  - Lectora/Lectora Online view that information as plain text, until the title is run. At that time it recognizes it as a variable because of the VAR() syntax. So when you are editing and change the name of your variable, Lectora/Lectora Online does not see that as a variable yet and therefore does not change it.

    You are using: ChangeContents -> Target Text block,  Value -> Set Text,  Text -> Var(Assesment1_Score)

    If you use: ChangeContents -> Target Text block,  Value -> Var(Assesment1_Score)

    ... (not "Set Text") you'll be okay when the variable name changes.
  • mnotermans5114
    mnotermans5114 Community Member Posts: 916
    Nice one Daryl. Thx :-)