cancel
Showing results for 
Search instead for 
Did you mean: 

Value Help resets Form Variable to initial value

Former Member
0 Kudos

I have a problem with Value Help from WebDynproNative library.

Form Variable value gets reset to initial after Value Help is clicked.

Also Radio button value gets reset to default.

Seems like whatever SAP delivered javascript code is doing in Value Help on click event - it resets radiobutton value and Form Variables.

Please respond if you have the same problem with Value Help.

Is this something to do with LCD version? My LiveCycle Designer is version 8.01.2088.1.380548.

Below is detailed description:

The form is Interactive Form object in the view of my WDA.

The Interactive Form properties are:

Display type = Native.

Enabled is checked.

The form itself was created in SFP with layout type = ZCI Layout.

Amongst other objects the form has Value Help nad radiobuttons. The Value Help is from WebDynproNative library.

There is also form variable vRbPay_saved in the form.

vRbPay_saved was created using "Form Propertiess' in Tab Variables.

Initial value of vRbPay_saved was set to null.

Here is my script along with standard SAP delivered script:

----- PDF_DATA.sf_page1.sf_1.sf_enter.sf_new.vHelp_costctr::click: - (JavaScript, client) ----------

My script:

console.println("<><><>< Help Center -Click event");
var vRbValue = PDF_DATA.sf_page1.sf_1.sf_enter.sf_pay.sf_rb_pay.rb_pay.rawValue;
vRbPay_saved.value = vRbValue;
console.println( "Before help---vRbPay_saved="+vRbPay_saved.value );

SAP delivered script:

var fieldName = "tf_costctr_new";

                    var theNodeName = this.resolveNode("parent." + fieldName).somExpression; 
                    ContainerFoundation_JS.SendMessageToContainer(event.target,
                                                                  "valueSelect", 
                                                                  xfa.resolveNode(theNodeName).dataNode.somExpression.replace(/(xfa.*?\.)(datasets.*?\.)(data.*?\.)/, ""), 
                                                                  xfa.resolveNode(theNodeName).rawValue, 
                                                                  event.target.mouseX,
	                                                          event.target.mouseY);

My code again:

console.println( "After help---vRbPay_saved="+vRbPay_saved.value );

Thank you very much,

Tatyana

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I figured out why the form variables and radio button value gets reset in my form after Value Help is clicked.

This happens because Value Help triggers server round trip and the form gets initalized on the return.

I read on this forum that generally SAP doesn't recommend much scripting in the form.

Now I understand why.

Also SAP Value Help is not as good as in pure SAP. It is slow and you can't scroll but have to click, click and click searching for the data.

Also it doesn't help much in data validation.

My recommendation to myself is:

If you are developing WDA application containing Interactive Adobe form - then the data that requires validation needs to be in WDA objects

other than form and before the form is invoked.

After the data is validated - then it can go into the form.

I am not saying that the form has to be Not Interactive in this case.

You still can do some interactivity like "click this - make that disabled, colored, invisible etc".

Just remember: in the form "you are not in Kansas anymore" - sorry not in SAP anymore.

Former Member
0 Kudos

Hi,

Sometimes it will trigger when we second time click on the form. I too faced this similar type of problem. Check these solutions it may be helpful

1. Follow the SAP Note 956074 and use report FP_CHK_REPORT to update the Form to ZCI. It will solve the problem.

2. If you are uploading any old PDF form in the Designer and making some changes and using it then it's better to do like open designer from SAP and also you can open the designer from Desktop i.er. goto program files->adobe->designer x.x->form.exe then open your old form and now copy each and every element in the form to designer of SAP. i.e. copy master page/subform/bodypage/script/scriptobject, etc., and paste in sap designer.

Probably one of the solution will definitely solves the issue.

Regards

Pradeep Goli