Expand my Community achievements bar.

SOLVED

long script sentences break even if valid syntax

Avatar

Level 4

hi

i need to use some long sentences of code (example below) but the script panel rejects them at a certain length - can this be worked around

i hope there is a simple way to have long sentences of code like the below without them breaking all the time??? 

example code

this.rawValue = "On a typical day I leave home for at " + work page10.page10posit.hm_wk_leavhome.rawValue + " and arrive at work at " + page10.page10posit.hm_wk_arve_wrk.rawValue + "." + " I leave work for home at " + page10.page10posit.hm_wk_leave_wrk.rawValue + " and I arrive home at" + page10.page10posit.hm_wk_gethome.rawValue;

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

There is no limit on the length of the scripts. What does the compiler say?

By glancing over your example, you should get an error at the

first occurrence where the word 'work' is used (this.rawValue = "On a

typical day I leave home for at " + work .....)

View solution in original post

1 Reply

Avatar

Correct answer by
Former Community Member

There is no limit on the length of the scripts. What does the compiler say?

By glancing over your example, you should get an error at the

first occurrence where the word 'work' is used (this.rawValue = "On a

typical day I leave home for at " + work .....)

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----