Skip to main content
jabf64075107
Participant
February 7, 2018
Answered

If Statement to test TextBox RawValue

  • February 7, 2018
  • 2 replies
  • 1289 views

On the preprint event of my LiveCycle Designer (9.0.0.2) form I have a Java if statement that checks if textboxes are null.

I want to check a textbox to see if it has a folder path entered eg. \\network1\Public\InBox\.

But I'm hitting a brick wall with my If statement...

Please help

This topic has been closed for replies.
Correct answer Test Screen Name

You want \\

Each \ has to be preceded by a backslash

That isn't what you did, you only have three.

This is not specific to Acrobat, but to JavaScript and all the C-like languages. See JavaScript Strings

2 replies

jabf64075107
Participant
February 8, 2018

Is there another forum I can ask this question?

try67
Community Expert
Community Expert
February 8, 2018

This is a better place for it, actually: LiveCycle Designer

try67
Community Expert
Community Expert
February 7, 2018

You have to escape all the back-slashes, by adding a back-slash before them.

jabf64075107
Participant
February 7, 2018

I tried: "\\\network1\\Public\\InBox\\" and  'Check Script Syntax' seems to like it - because there is no more pink line highlighting it.

But! it fails to fire the app.alert, xfa.cancelAction, and xfa.host.setfocus actions.

Is my syntax legit?