cancel
Showing results for 
Search instead for 
Did you mean: 

REG: Hiding Objects in adobe forms

Former Member
0 Kudos

Dear Experts,

I am working on interactive forms. I have some queries which are as following:

- I am designing an adobe template with a subform to be diplayed when required else not. I tried the visibility option but it seems it has to be done using Scripts.

- In the scripts editor, I am using a script to make a particular sub form invisible:

xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence="Hide"

-This is giving me error like:

accessor-unkown if I keep it at datasource and run it at the initialize.

-If I keep the code at the particular subform and run it at initialize, it gives me an error like:

Invalid enumerated value: hide

I am unable to understand where to keep my code or whether I need to do some modifications in the script?

-I am using FormCalc.

Also, Is it possible to have a attribute of type integer and call it in the script to check if it is 0, I need to display the subform else not.

I hope I am clear with my queries. Helpful answers will be appreciated.

Thanks in advance,

Regards,

Gaurav.

Accepted Solutions (1)

Accepted Solutions (1)

former_member189058
Active Contributor
0 Kudos

Hi Gaurav,

Use


xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence="hidden"

Regards,

Reema

Former Member
0 Kudos

Hi Reema,

Thanks for your reply, but when I am using the following code:

xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence="hidden"

It's giving me an error like:

Script failed: Accessor xfa.form.Vn_DataSource.pageSet.Page1.SubForm_AlertStamp.presence is unknown.

I am writing this code at the node initialize and I tried writing it at the sub form also. Can you please suggest me why I am getting this error? Is that a code error or I am writing it at a wrong place?

Thanks in advance

Warm Regards,

Gaurav

former_member189058
Active Contributor
0 Kudos

Gaurav,

Is the subform AlertStamp placed on page1?

Can you pl let me know what is written before the event name in the script editor when you select the subform.

What is written before this in teh script editor.

*::initialize - (FormCalc,client) -


*

Regards,

Reema.

Former Member
0 Kudos

Hi Reema,

Yes this sub form Alert Stamp is on page one only and the foowing is wriiten on the top of script editor when I select Sub Form:

-


Vn_DataSource.#pageSet[0].Page1.subForm_alertStamp::initialize - (FormCalc, client) -


Regards,

Gaurav

former_member189058
Active Contributor
0 Kudos

I guess then the problem is just the case.

Use the same case that you see before the event name


xfa.form.Vn_DataSource.pageSet.Page1.subForm_alertStamp.presence = "hidden"

Reema.

Note that the keyword is hidden and not hide.

Former Member
0 Kudos

Hello Reema,

Thanks a lot for all your help and quick responses. My problem got solved. Yes that was a case problem. I am able to make that invisible now.

Can you give me some idea about material or links based on using scripts in interactive forms.

Thanks & Regards,

Gaurav.

former_member189058
Active Contributor
0 Kudos

Hi Gaurav,

Thanks for the points. I appreciate it.

Here is a useful link for formCalc Specifications:

[Adobe XML Architecture - FormCalc Specification 2.0|http://partners.adobe.com/public/developer/en/xml/formcalc_2.0.pdf]

Enjoy SAP!!

Regards,

Reema.

sankar_narayana
Active Participant
0 Kudos

Hi Gaurav,

One quick suggestion, whenever you are hiding a subform, make the form dynamic otherwise hiding of subform cannot be successful.

How to make the form dynamic.

Place the code in the domodifyview of where your Interactive Form UI Element was defined

public static void wdDoModifyView(IPrivateInitiatorView wdThis, IPrivateInitiatorView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)

{

//@@begin wdDoModifyView

IWDInteractiveForm iForm1 = (IWDInteractiveForm) view.getElement("InitiatorForm");

* iForm1.setDynamicPDF(true);*

//@@end

}

Answers (0)