Forum Discussion

ShivaRangan-eb1's avatar
ShivaRangan-eb1
Community Member
5 years ago

How to copy variables from one story file to another?

Hello,

I have two SL 360 story files and both have unique named variables. I am trying to copy a slide from one story file to another but the variables are not copying. How can I get SL 360 to automatically copy variables from one story file to another? I know this is possible because I could get it to happen in one of my earlier projects. What am I doing wrong? I am adding both story files for your reference. Thanks in advance.

  • Hi Shiva!

    Great question!

    You can copy and paste variables between projects by using the copy/paste buttons! I've recorded a short demo for you. Here's the link!

    Let me know if you have any questions!

  • maxoon's avatar
    maxoon
    Community Member

    Hello.

    Please be so kind to answer these follow-ups:

    1) How is the behaviour when a slide that uses variables in triggers is copied from one .story to another .story?

    2) Will the slide carry over it's variables?

    3) Assuming both .story files have the same set of variables to begin with. What happens to the variable set if a slides that uses variables in triggers is copied over? Will Storyline understand to use the same-named pre-existing variable or create a new variable instance?

    Please advise.

    Thank you.

    • Hello!

      I'm happy to help!

      Courses that include variables and triggers based on the variables will be imported when importing that course into another course. Variables and triggers will stay intact. 

      If you're importing a project that already has the same name as a variable in the project, then you'll see this message:

      You can either merge the variables or rename the variables.

      Let me know if I can help with anything else!

  • Is there a way to share variables between two separate storyline files? So if conditions are met to adjust variables in the first course, they can be referenced in the second course. I'd like to create some adaptive branching from one course to another. For example, an assessment that branches to a separate remedial course which shows information based on scores of the first. I know I can do this within a single storyline file, but was hoping to make a separate remedial course file. I hope this makes sense.

     

  • Hi Laura,

    A variable is designed to work across slides in a single project. 

    Since you are asking about project to project, you will need to use Javascript. This conversation may help get you started and I look forward to other ideas from members of the community.

  • Emily_Tacoma's avatar
    Emily_Tacoma
    Community Member

    Hi- I have a similar question. If I'm creating multiple courses and I want to use the same variables for tracking information on my side, is there a way to export the variables list from one project and import it into another so I use all the same naming conventions?

    • JoseTansengco's avatar
      JoseTansengco
      Staff

      Hi Emily, 

      There isn't a way to export and import a variables list, but you can build a course that uses the variables you want to reuse and save it as a Storyline 360 template. You can then import the template to a Storyline 360 project whenever you want to bring in the variables. Just a few things to note: 

      • The variables have to be referenced by triggers before they can be imported. Unused variables will not be imported. 
      • You can then delete slides you don't need from the import process. This won't remove the imported variables.

      Hope this helps!