Expand my Community achievements bar.

SOLVED

Made changes to a script and now it's not working

Avatar

Level 7

I have this script that if the No radio button is clicked it filled in fields with N/A. If the user clicks the Yes radio button, the fields are left blank for the user to fill in. The script was working. Then I had to change the names of the Rows and fields in the table and now the script doesn't work. Any thoughts on how to troubleshoot this? Here's the script:

switch

(this.rawValue)

{

case '1': // Yes is bound as 1

form1.page5.Table1.Row1[0].offSiteQuest.rawValue

= "";

form1.page5.Table1.Row1[1].offSiteQuest.rawValue

= "";

form1.page5.Table1.Row1[2].offSiteQuest.rawValue

= "";

form1.page5.Table1.Row1[3].offSiteQuest.rawValue

= "";

form1.page5.Table1.Row1[4].offSiteQuest.rawValue

= "";

break;

case '0':

form1.page5.Table1.Row1[0].offSiteQuest.rawValue

= "N/A";

form1.page5.Table1.Row1[1].offSiteQuest.rawValue

= "N/A";

form1.page5.Table1.Row1[2].offSiteQuest.rawValue

= "N/A";

form1.page5.Table1.Row1[3].offSiteQuest.rawValue

= "N/A";

form1.page5.Table1.Row1[4].offSiteQuest.rawValue

= "N/A";

break;

}

Thanks,

Margaret Dawn

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Just sent you an updated version ....I used section 6 ....your issue was in using [] in a javascript expression. That notion signifies an array notation to javascript, so you must wrap the expression in an xfa.resolveNode("string that represents the expression").....or change over to formcalc where the [] are allowed.

Paul

View solution in original post

6 Replies

Avatar

Former Community Member

Can't do much without seeing the form ....can you post it to LiveCycle8@gmail.com?

paul

Avatar

Level 7

Just sent. Thanks.

Margaret Dawn

Supervisor - Documentation

W: 630-850-1065

Avatar

Level 7

There is an example of the issue in Section 2: Off-site Sales

Margaret Dawn

Supervisor - Documentation

W: 630-850-1065

Avatar

Correct answer by
Former Community Member

Just sent you an updated version ....I used section 6 ....your issue was in using [] in a javascript expression. That notion signifies an array notation to javascript, so you must wrap the expression in an xfa.resolveNode("string that represents the expression").....or change over to formcalc where the [] are allowed.

Paul

Avatar

Level 7

Thank you.

Margaret Dawn

Supervisor - Documentation

W: 630-850-1065

Avatar

Level 7

Yeah. It works and I learned something new.

Thanks,

Margaret Dawn

Supervisor - Documentation

W: 630-850-1065

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] ----