Forum Post: (Suggestion?) Replace template tokens after parsing?

  • Thread starter Thread starter matman
  • Start date Start date
Status
Not open for further replies.
M

matman

Guest
Is it possible to replace the {!...} template tokens with corresponding values after the script has been parsed? Right now only the template tokens manually entered in my script are replaced. I am trying to retrieve values more dynamically using arrays, generating the tokens during execution: var statusNameNmbr = ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13"]; var fields = [ ["bbs", "box", "email", "housenet", "jira", "letter", "final"] ]; var s1 = "{!web01_bbs}"; var s2 = new String("{" + '\u0021' + "web" + statusNameNmbr[0] + "_" + fields[0][0] + "}"); rbv_api.log("debug", "String #1: " + s1 + ", string #2: " + s2); This logs "String #1: true, string #2: {!web01_bbs}", but as you may understand, I'd rather get the corresponding value (true / false for this checkbox).

Continue reading...
 
Status
Not open for further replies.
Back
Top