Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Unable to get field name/value of opened PDF with Folder Level script.

dada1221
Level 2
Level 2

Hello,

I am trying to get the value of a field from a menu item. I am using this script from the Folder Level so on load I can add the menu item.

However, I am unable to get the value of my field.

Here is my code:

function GetFieldValue()

{

  var firstName = First_Name.rawValue;

  app.alert(firstName);

}

app.addMenuItem({cName:"-", cParent:"Help", cExec:" "});

app.addMenuItem({cName:"Get Field Value", cParent:"Help", cExec:"GetFieldValue();"});

This is the error I get:

But when I try the same script from a button click, it works perfectly!

form1.#subform[0].btnGetFields::click - (JavaScript, client)

  var firstName = First_Name.rawValue;

  app.alert(firstName);

This is how my form looks like in the Hierarchy.

997476_pastedImage_4.png

Any help would be appreciated!

Thank you!

5 Replies
Bernd_Alheit
Level 3
Level 3

Try the forum for LiveCycle Designer.

dada1221
Level 2
Level 2

Is there a way to move the post over there or I need to copy and create a new thread?