Expand my Community achievements bar.

How to get filename of the current pdf form?

Avatar

Level 2

As my handle suggests I'm really a newbie.

From my research I know that the filename of the pdf (which shows in the form properties) is somehow accessible using xfa.resolveNode but I don't know how to ask for it. ie. I don't know the reference to use for request to filename.

just wondering if anyone could quickly point me in the right direction.

also is there a good reference for all the objects in the DOM and how to get at them?

Thanks
George

16 Replies

Avatar

Former Community Member

If you add the file name to the title in the form properties as follows:

p.png

you can access the title using xfa.host.title.

Steve

Avatar

Level 2

Thanks for the suggestion Steve. Unfortunately I really need the filename

field since the form is a "signable" form which seems to have the added

functionality(somewhat useful) of saving itself to another file when it gets

"signed" . What I then want to do is grab the file it saved itself as and

send an email to the next approver with the filename of the where it saved

itself on our corporate CMS system(RDIMS).

Also, if you know of where I can find more info on all objects in the DOM

and how to reference them...I would be very grateful.

Thanks again

George

Avatar

Former Community Member

To get to the filename of the file that is loaded use this command:

event.target.documentFilename

To get info about the different objects that are available look at the help in designer and specifically the scripting reference.

Paul

Avatar

Level 2

Hey Paul,

see attached..

there doesn't seem to be a "documentFilename" attrib to target?

Avatar

Former Community Member

The command is actually an Acroform command. The event.target will get you to the doc object in acrobat. The object assist is for XFA only so it will not show up there ....but it will still work.

paul

Avatar

Level 2

ahhhhh

things are starting to defog...thanks muchly...have a good weekend

Avatar

Former Community Member

Sorry the commmand is documentFileName not documentFilename

paul

Avatar

Level 2

sorry Paul to keep bugging you...my day is not going well obviously....

I did everything you told me and please see attached....

it seems that the filename your command picks up is some temp filename and

not the one in the form properties.

any ideas?

Thanks again

Avatar

Former Community Member

You are running inside of the Preview. The PDF gets created in a temp folder with a temp file name and that is what is being reported. If you save the file out and use it outside of Preview it will report the filename as you know it.

paul

Avatar

Level 2

wow...you're so smart man !!!

thx

Avatar

Level 2

Hi Paul,

I wish I could find this stuff on my own..but don't know where to look for

the function calls.

anyway..

2 probs:

1-I want to do something similar to

http://www.windjack.com/PDFSamples/DynamicEmail_AcroForm.pdf which works but

my version

(see attached) doesn't.. But the attached code for "Submit for Approval"

button seems similar to me but doesn't work. I think only difference is that

the example is an acrobat form and the latter is in livecycle....any ideas?

2-How do I access the variables set in the form properties "variables" tab

since Ideally I'd like the users to set these depending on who the form has

to be approved by? Again...I'd love to look these up myself but am having

problems finding the object references. any help is appreciated.

Thanks again.

George

Avatar

Former Community Member

There is no attachment can you email me the form instead.

LiveCycle8@gmail.com

To get at system variables you woudl use variableName.value. How are you going to get the user to set them (they are set at Design time).....maybe you shouldl describe what you are trying to accomplish and I can suggest a way.

Paul

Avatar

Level 2

Hi Paul,

here is the msg again. Hopefully the attachment comes through.

see comments inline

thx again

======================

There is no attachment can you email me the form instead.

mailto:LiveCycle8@gmail.com

To get at system variables you woudl use variableName.value.

How are you going to get the user to set them (they are set at Design time)

>>I don't know if they are the "system variables" ..the one's I'm talking

about are those under form properties/variables tab in the livecycle file

menu.--I would set them on behalf of the "owner" of the form.

.....maybe you shouldl describe what you are trying to accomplish and I can

suggest a way.

>>see form attached..what I'm trying to do is create a routable form.

ultimately fully automatic where, once the first signature has been set it

routes to the next etc.

But I've found that our management wants to save a copy in our CMS system

(RDIMS) after every signoff. This actually works at this point since the

signing forces a save. So....therefore I just want to "inform" the next guy

inline to sign it off (hence the need to read the emails of next in line

from form variables).

Thanks Paul

Avatar

Level 2

Hi Paul,

just sent something to your livecycle8@gmail.com acct.

hope that you might give me a hand

Thx

George