Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Save Form Presence on certified form

Avatar

Former Community Member

I have an inspection form that populates a single text box from mulitple drop-down values.  I have no problems saving the presence of all the hidden pages, expect for the page that contains the script that populates the single text box.  This form has to be certified, so I have to preserve scipting changes manually.

The script (partial) for the text box is in the calculated event- JavaScript  (This script works great!)

var str = "";

//--------Drop Down 1-----------

if (form1.recordKeepingPage.RecordKeeping.rk_BusName.rawValue == "No" || form1.recordKeepingPage.RecordKeeping.rk_BusName.rawValue == "Partial name")

     {

     if (form1.recordKeepingPage.RecordKeeping.rk_BusName.rawValue == "No")

          {

          str = "Required Records - No business name listed" + "\n";

          }

    else

          {

          str = "Required Records - Partial business name listed" + "\n";

          }

     }

The script from the Drop Down to display the hidden page when a specfic value is selected in the change event-JavaScript

if (xfa.event.newText=="No")

     {

     NonCompliancePage.presence="visible";

     }

if (xfa.event.newText=="Partial name")

     {

     NonCompliancePage.presence="visible";

     }

This is the script I am using to save all other hidden pages that are displayed in the initialize event-JavaScript

if (this.rawValue==1)

     (HiddenPage.presence="visible";)

else

     (HiddenPage.presence="hidden";)

The above script will not save the hidden page (displayed) that contains the 1st script that populates the text box from multiple drop down values.  Is there a special way to code it? 

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Solved:

Place this script in the subform root level in the FormReady event -JavaScript.

var oList = this.getDeltas ();

for (i=0; i < oList.length; i ++)

{

   var oDelta = oList.item(i);

   oDelta.restore ();

}

Answer was found at http://forms.stefcameron.com/2008/09/29/restoring-the-of-your-form/

View solution in original post

2 Replies

Avatar

Correct answer by
Former Community Member

Solved:

Place this script in the subform root level in the FormReady event -JavaScript.

var oList = this.getDeltas ();

for (i=0; i < oList.length; i ++)

{

   var oDelta = oList.item(i);

   oDelta.restore ();

}

Answer was found at http://forms.stefcameron.com/2008/09/29/restoring-the-of-your-form/

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