Action Conditions

andrew-robertson Community Member Posts: 311 ♦ Idol ♦
Hi there community -

Is there an easy way to include JQuery statements in the Set Action Conditions window?

The image above shows the if statement that I am trying to enact; more specifically the items on teh end that deal with the AICC_Student_ID and the AICC_Student_Name (proctor validation process we are doing).

The image above shows my Set Action Conditions that I am working with. When I publish the content with the above settings it gives me a bunch of quotes in locations I don't want and caused my if/then statement to not function as expected (see below for the actual output from Lectora).

Any thoughts? Tips? Tricks?
Andrew R.
Developing content since 2010 using a mixed bag of tools.

Best Answer

  • timk
    timk Community Member Posts: 1,235 ✭ Legend ✭
    Answer ✓
    I don't think this field is a suitable place for custom scripts. ".equals()" is a Lectora function that will probably not accept anything but strings or references to Lectora variables as "VAR(myVariable)". Lectora variables always contain strings. Even if you found a way to produce the desired output, I wouldn't expect it to work.

    It should be better to do the jQuery part first and put the results into a Lectora variable that can be used in the condition. If it's an entry field that you want to check use the entry fields variable.